<?php echo $__env->make('admin.header', [
   'elementActive' => 'core'
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>


<div class="content-wrapper">

    <section class="content-header">
      <h1>
      Cores e menus	      <small>Altere o nome dos menus e as cores do seu site</small>
      </h1> 
    </section>

    <!-- Main content -->
    <section class="content">
    <div class="row">

        <div class="col-xs-12">

            <div class="nav-tabs-custom">

                <ul class="nav nav-tabs ">
                    
                    <li <?php echo $active == 'header' || $active == false ? 'class="active"' : ''; ?>>
                        <a href="#menu" data-toggle="tab">Menu Topo</a>
                    </li>

                    <li <?php echo $active == 'footer' ? 'class="active"' : ''; ?>>
                        <a href="#menu_rodape" data-toggle="tab">Menu Rodape</a>
                    </li>

                    <li <?php echo $active == 'colors' ? 'class="active"' : ''; ?>>
                        <a href="#cores" data-toggle="tab">Cores</a>
                    </li>

                </ul>

                <div class="tab-content">


                      <div id="menu" class="tab-pane <?php echo $active == 'header' || $active == false ? 'active' : ''; ?>">

                          

                        <div style="padding-bottom:15px;">
                            Ordene movendo para cima e para baixo e transforme em sub-menus movendo para os lados.
                        </div>
                        
                        <div class="dd" id="nestable">
                            <ol class="dd-list">
                                <?php $__currentLoopData = $headers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $header): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <li class="dd-item dd3-item" data-id="<?php echo e($header->id); ?>">
                                        <div class="dd-handle dd3-handle">
                                            <i class="fa fa-arrows" style="margin-top: 4px"></i>
                                        </div>
                                        <div class="dd3-content-editar" onclick="openUpdateHeaderModal(<?php echo e($header->id); ?>, '<?php echo e($header->name); ?>', '<?php echo e($header->value); ?>', <?php echo e($header->enable); ?>);">
                                            <i class="fa fa-pencil" style="margin-top: 4px"></i>
                                        </div>
                                        <div class="dd3-content"><?php echo e($header->name); ?></div>
                                        <ol class="dd-list"></ol>
                                    </li>  
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                            </ol>							
                        </div>

                        <div style="clear:both; padding-top:15px;">
                            <form action="<?php echo e(route('admin.core.update', 'header')); ?>" method="post">
                                <?php echo csrf_field(); ?>
                                <?php echo method_field('PUT'); ?>
                                <input type="hidden" name="headers_order" id="nestable-output" class="form-control" value="">
                                <button type="submit" class="btn btn-primary">Salvar Ordem</button>
                            </form>
                        </div>

                    </div>


                      <div id="menu_rodape" class="tab-pane <?php echo $active == 'footer' ? 'active' : ''; ?>">


                        <div style="padding-bottom:15px;">Ordene movendo para cima e para baixo.</div>
                        
                        <div class="dd" id="nestable_rodape">
                            <ol class="dd-list">
                                <?php $__currentLoopData = $footers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $footer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <li class="dd-item dd3-item" data-id="<?php echo e($footer->id); ?>">
                                        <div class="dd-handle dd3-handle">
                                            <i class="fa fa-arrows" style="margin-top: 4px"></i>
                                        </div>
                                        <div class="dd3-content-editar" onclick="openUpdateFooterModal(<?php echo e($footer->id); ?>, '<?php echo e($footer->name); ?>', '<?php echo e($header->value); ?>', <?php echo e($footer->enable); ?>);">
                                            <i class="fa fa-pencil" style="margin-top: 4px"></i>
                                        </div>
                                        <div class="dd3-content"><?php echo e($footer->name); ?></div>
                                    </li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </ol>
                        </div>
                        
                        <div style="clear:both; padding-top:15px;">
                            <form action="<?php echo e(route('admin.core.update', 'footer')); ?>" method="post">
                                <?php echo csrf_field(); ?>
                                <?php echo method_field('PUT'); ?>
                                <input type="hidden" name="footers_order" id="nestable-output_rodape" class="form-control" value="">
                                <button type="submit" class="btn btn-primary">Salvar Ordem</button>
                            </form>
                        </div>
                        
                    </div>


                    <div id="cores" class="tab-pane <?php echo $active == 'colors' ? 'active' : ''; ?>">
                    <form action="<?php echo e(route('admin.core.update', 'colors')); ?>" class="form-horizontal" method="post">
                        <?php echo csrf_field(); ?>
                        <?php echo method_field('PUT'); ?>

                        
                        <div class="row">
                            <div class="col-xs-12" style="padding-bottom:15px; background-color:#eee; ">
                                <div style="float:left; width:20%; text-align:center; margin-top:20px;">
                                    <label>Topo do site - Textos</label>
                                </div>
                                <div style="float:left; width:25%; text-align:center; margin-top:15px;">
                                    <input type="color" id="top_menu" color="top_menu" name="top_menu" onchange="clickColor(0, -1, -1, 5)" value="<?php echo e($colors->top_menu); ?>" style="width:85%;">
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-xs-12" style="padding-bottom:15px; ">
                                <div style="float:left; width:20%; text-align:center; margin-top:20px;">
                                    <label>Topo do site - Textos selecionados</label>
                                </div>
                                <div style="float:left; width:25%; text-align:center; margin-top:15px;">
                                    <input type="color" id="top_menu_selected" name="top_menu_selected" onchange="clickColor(0, -1, -1, 5)" value="<?php echo e($colors->top_menu_selected); ?>" style="width:85%;">
                                </div>
                            </div>
                        </div>

                            <div class="row">

                                <div class="col-xs-12" style="padding-bottom:15px; ">
                                    <div style="float:left; width:20%; text-align:center; margin-top:20px;">
                                        <label>Cor Primária</label>
                                    </div>
                                    <div style="float:left; width:25%; text-align:center; margin-top:15px;">
                                        <input type="color" id="primary" name="primary" onchange="clickColor(0, -1, -1, 5)" value="<?php echo e($colors->primary); ?>" style="width:85%;">
                                    </div>
                                </div>
                            
                            </div>
                            
                            <div class="row">

                                <div class="col-xs-12" style="padding-bottom:15px; background-color:#eee; ">
                                    <div style="float:left; width:20%; text-align:center; margin-top:20px;">
                                        <label>Cor Primária - Contraste</label>
                                    </div>
                                    <div style="float:left; width:25%; text-align:center; margin-top:15px;">
                                        <input type="color" id="primary_contrast" name="primary_contrast" onchange="clickColor(0, -1, -1, 5)" value="<?php echo e($colors->primary_contrast); ?>" style="width:85%;">
                                    </div>
                                </div>

                            </div>
                            
                            <div class="row">
                                <div class="col-xs-12" style="padding-bottom:15px; ">

                                    <div style="float:left; width:20%; text-align:center; margin-top:20px;">
                                        <label>Cor Secundária</label>
                                    </div>
                                    <div style="float:left; width:25%; text-align:center; margin-top:15px;">
                                        <input type="color" id="secondary" name="secondary" onchange="clickColor(0, -1, -1, 5)" value="<?php echo e($colors->secondary); ?>" style="width:85%;">
                                    </div>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="col-xs-12" style="padding-bottom:15px; background-color:#eee; ">
                                    <div style="float:left; width:20%; text-align:center; margin-top:20px;">
                                        <label>Cor Secundária - Contraste</label>
                                    </div>
                                    <div style="float:left; width:25%; text-align:center; margin-top:15px;">
                                        <input type="color" id="secondary_contrast" name="secondary_contrast" onchange="clickColor(0, -1, -1, 5)" value="<?php echo e($colors->secondary_contrast); ?>" style="width:85%;">
                                    </div>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="col-xs-12" style="padding-bottom:15px; ">

                                    <div style="float:left; width:20%; text-align:center; margin-top:20px;">
                                        <label>Cor Terciária</label>
                                    </div>
                                    <div style="float:left; width:25%; text-align:center; margin-top:15px;">
                                        <input type="color" id="secondary" name="tertiary" onchange="clickColor(0, -1, -1, 5)" value="<?php echo e($colors->tertiary); ?>" style="width:85%;">
                                    </div>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="col-xs-12" style="padding-bottom:15px; background-color:#eee; ">
                                    <div style="float:left; width:20%; text-align:center; margin-top:20px;">
                                        <label>Cor Terciária - Contraste</label>
                                    </div>
                                    <div style="float:left; width:25%; text-align:center; margin-top:15px;">
                                        <input type="color" id="tertiary_contrast" name="tertiary_contrast" onchange="clickColor(0, -1, -1, 5)" value="<?php echo e($colors->tertiary_contrast); ?>" style="width:85%;">
                                    </div>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="col-xs-12" style="padding-bottom:15px; ">
                                    <div style="float:left; width:20%; text-align:center; margin-top:20px;">
                                        <label>Rodapé - Fundo</label>
                                    </div>
                                    <div style="float:left; width:25%; text-align:center; margin-top:15px;">
                                        <input type="color" id="footer_background" name="footer_background" onchange="clickColor(0, -1, -1, 5)" value="<?php echo e($colors->footer_background); ?>" style="width:85%;">
                                    </div> 
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="col-xs-12" style="padding-bottom:15px; background-color:#eee; ">
                                    <div style="float:left; width:20%; text-align:center; margin-top:20px;">
                                        <label>Rodapé - Textos</label>
                                    </div>
                                    <div style="float:left; width:25%; text-align:center; margin-top:15px;">
                                        <input type="color" id="footer_texts" name="footer_texts" onchange="clickColor(0, -1, -1, 5)" value="<?php echo e($colors->footer_texts); ?>" style="width:85%;">
                                    </div>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="col-xs-12" style="padding-bottom:15px; ">
                                    <div style="float:left; width:20%; text-align:center; margin-top:20px;">
                                        <label>Rodapé - Titulos</label>
                                    </div>
                                    <div style="float:left; width:25%; text-align:center; margin-top:15px;">
                                        <input type="color" id="footer_titles" name="footer_titles" onchange="clickColor(0, -1, -1, 5)" value="<?php echo e($colors->footer_titles); ?>" style="width:85%;">
                                    </div>
                                </div>
                            </div>
                            
                            
                            
                           
                                                        
                        <div style="padding-top:15px;">
                            <button type="submit" class="btn btn-primary">Salvar</button>
                        </div>

                    </form>
                    </div>

                    
                </div>
            
            </div>
            
        </div>

    </div>
    <!-- /.row -->
</section>
<!-- /.content -->

</div>

<script>
    function openUpdateHeaderModal(id, name, value, enable){

        $("#header_id_menu").val(id);
        $("#header_enable").val(enable);
        $("#header_name").val(name);
        $("#header_value").val(value);
        $("#updateHeader").modal();

    }
    function openUpdateFooterModal(id, name, value, enable){

        $("#footer_id_menu").val(id);
        $("#footer_enable").val(enable);
        $("#footer_name").val(name);
        $("#footer_value").val(value);
        $("#updateFooter").modal();

    }
</script>

<div id="updateHeader" class="modal fade" role="dialog">
    <div class="modal-dialog modal-md">
  
      <!-- Modal content-->
      <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">×</button>
            <h5 class="modal-title modal_titulo">Edite o menu do topo</h5>
         </div>
         <div class="modal-body" id="modal_conteudo_m">
            <style type="text/css">
               .bootstrap-timepicker-widget table{
               background-color: #fff !important;
               }
            </style>
        <form action="<?php echo e(route('admin.core.update', 'header')); ?>" method="post">
            <?php echo csrf_field(); ?>
            <?php echo method_field('PUT'); ?>
  

                <input type="text" name="id_menu" id="header_id_menu" value="" hidden>
                <fieldset>
                    <div class="form-group">
                        <label>Nome do menu </label>
                        <input type="text" name="name" id="header_name" class="form-control" value="">
                    </div>
                    <div class="form-group">
                        <label>Redirecionar para</label>
                        <input type="text" name="value" id="header_value" class="form-control" value="">
                    </div>
                    <div class="form-group">
                        <label>Habilitado </label>
                        <select class="form-control" name="enable" id="header_enable">
                            <option value="1">Sim</option>
                            <option value="0">Não</option>
                        </select>
                    </div>
                </fieldset>

            </div>
    
            <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Salvar</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
            </div>
        </form>
      </div>
  
    </div>
  </div>

  
<div id="updateFooter" class="modal fade" role="dialog">
    <div class="modal-dialog modal-md">
  
      <!-- Modal content-->
      <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">×</button>
            <h5 class="modal-title modal_titulo">Edite o menu do topo</h5>
         </div>
         <div class="modal-body" id="modal_conteudo_m">
            <style type="text/css">
               .bootstrap-timepicker-widget table{
               background-color: #fff !important;
               }
            </style>
        <form action="<?php echo e(route('admin.core.update', 'footer')); ?>" method="post">
            <?php echo csrf_field(); ?>
            <?php echo method_field('PUT'); ?>
  

                <input type="text" name="id_menu" id="footer_id_menu" value="" hidden>
                <fieldset>
                    <div class="form-group">
                        <label>Nome do menu </label>
                        <input type="text" name="name" id="footer_name" class="form-control" value="">
                    </div>
                    <div class="form-group">
                        <label>Redirecionar para</label>
                        <input type="text" name="value" id="footer_value" class="form-control" value="">
                    </div>
                    <div class="form-group">
                        <label>Habilitado </label>
                        <select class="form-control" name="enable" id="footer_enable">
                            <option value="1">Sim</option>
                            <option value="0">Não</option>
                        </select>
                    </div>
                </fieldset>

            </div>
    
            <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Salvar</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
            </div>
        </form>
      </div>
  
    </div>
  </div>

<?php echo $__env->make('admin.footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<script src="<?php echo e(asset('asset/api/nestable/jquery.nestable.js')); ?>"></script>
<script src="<?php echo e(asset('asset/api/nestable/examples.nestable.js')); ?>"></script>

<script>
(function( $ ) {

'use strict';
    
/*
Update Output
*/
var updateOutput = function (e) {
    var list = e.length ? e : $(e.target),
        output = list.data('output');

    if (window.JSON) {
        output.val(window.JSON.stringify(list.nestable('serialize')));
    } else {
        output.val('JSON browser support required for this demo.');
    }
};

var updateOutput_rodape = function (e) {
    var list = e.length ? e : $(e.target),
        output_rodape = list.data('output_rodape');
        
    if (window.JSON) {
        output_rodape.val(window.JSON.stringify(list.nestable('serialize')));
    } else {
        output_rodape.val('JSON browser support required for this demo.');
    }
};

/*
Nestable 1
*/
$('#nestable').nestable({
    group: 1
}).on('change', updateOutput);

$('#nestable_rodape').nestable({
    group: 1
}).on('change', updateOutput_rodape);

/*
Output Initial Serialised Data
*/
$(function() {
    updateOutput($('#nestable').data('output', $('#nestable-output')));
    updateOutput_rodape($('#nestable_rodape').data('output_rodape', $('#nestable-output_rodape')));
});

}).apply(this, [ jQuery ]);
    </script><?php /**PATH C:\GIT\sitemoderno\Modules/Core\Resources/views/admin/index.blade.php ENDPATH**/ ?>