update slim scroll

This commit is contained in:
Aung Myo
2017-10-11 17:53:29 +06:30
parent 12bf1dfc19
commit 6e47fbfe41
11 changed files with 288 additions and 242 deletions

View File

@@ -63,6 +63,27 @@
});
$(function(){
var height = ($(window).height() - ($('.legal').outerHeight() + $('.user-info').outerHeight() + $('.navbar').innerHeight()));
$('#custom-slimscroll').slimScroll({
height: height,
size: '5px',
color: 'rgba(0,0,0,0.5)',
alwaysVisible: false,
borderRadius: '0',
railBorderRadius: '0'
});
$('#order-detail-slimscroll').slimScroll({
height: height-180,
size: '5px',
color: 'rgba(0,0,0,0.5)',
alwaysVisible: false,
borderRadius: '0',
railBorderRadius: '0'
});
});
$(document).on("focus", "[data-behaviour~='datepicker']", function(e){
$(this).datepicker({"format": "yyyy-M-dd", "weekStart": 1, "autoclose": true});
$('.dropdown-toggle').dropdown();

View File

@@ -78,6 +78,15 @@ section.content {
.card {
margin-bottom: 20px;
}
.card .card-header {
padding: 0.5rem;
}
.card .card-title{
margin-bottom:0.5rem;
}
.card .card-block {
padding: 0.5rem 1rem 1rem;
}
.checkbox label, label.checkbox-inline {
padding-left: 0;
@@ -121,7 +130,7 @@ select.form-control {
}
/* End Reset */
/*
.dining {
min-height:470px;
max-height:570px;
@@ -133,7 +142,7 @@ select.form-control {
max-height:500px;
overflow:auto
}
*/
.others-payment{
line-height:100px;
text-align:center;

View File

@@ -37,10 +37,10 @@
<div class="row clearfix">
<div class="col-lg-5 col-md-5 col-sm-5 col-xs-12">
<div class="form-group">
<div class="form-line">
<input type="text" name="filter" style="margin-right:10px" id="search" placeholder="Search" class="form-control input-sm col-md-9">
<!-- <div class="form-line"> -->
<input type="text" name="filter" style="margin-right:10px" id="search" placeholder="Search" class="form-control input-sm col-md-12">
<input type="hidden" name="type" id="type" value="">
</div>
<!-- </div> -->
</div>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-12">
@@ -101,7 +101,9 @@
</div>
<div class="col-lg-4 col-md-4 col-sm-4" style="min-height:600px; max-height:600px; overflow-x:scroll">
<!-- <div class="col-lg-4 col-md-4 col-sm-4" style="min-height:600px; max-height:600px; overflow-x:scroll"> -->
<div class="col-lg-4 col-md-4 col-sm-4" >
<div id="custom-slimscroll">
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>
<span class="patch_method"></span>
@@ -234,6 +236,7 @@
<%= f.button :submit, "Submit",:class => 'btn bg-blue waves-effect', :id => 'submit_customer' %>
<!-- <%= f.button :submit, "Update",:class => 'btn bg-blue btn-block', :disabled =>'', :id => 'update_customer' %> -->
</div>
</div>
<%end%>
</div>

View File

@@ -18,13 +18,14 @@
<p>Date: <span id="receipt_date"> <%=@sale_data.receipt_date.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span></p>
</div>
</div>
<div id="custom-slimscroll">
<div class="card-text dining">
<table class="table table-default" id="order-items-table">
<thead>
<tr>
<th class="item-name">Items</th>
<th class="item-attr">QTY</td>
<th class="item-attr">Price</td>
<th class="item-attr">QTY</th>
<th class="item-attr">Price</th>
</tr>
</thead>
<tbody>
@@ -53,6 +54,7 @@
</tbody>
</table>
</div>
</div>
<div class="card-footer">
<table class="table" id="order-charges-table" border="0">
<tr>

View File

@@ -20,9 +20,9 @@
</ul>
<!-- Nav tabs - End -->
<div class="tab-content" >
<div class="tab-content" id="custom-slimscroll">
<!--- Panel 0 - Completed Orders -->
<div class="tab-pane dining" id="Completed" role="tabpanel">
<div class="tab-pane dining" id="Completed " role="tabpanel">
<div class="card-columns">
<% @complete.each do |sale| %>
<div class="card sales red text-white" data-id = "<%= sale.sale_id %>">

View File

@@ -21,7 +21,8 @@
</li>
</ul>
<!-- Nav tabs - End -->
<div class="tab-content">
<div id="custom-slimscroll">
<div class="tab-content" >
<!--- Panel 0 - Completed Orders -->
<div class="tab-pane dining" id="completed" role="tabpanel">
@@ -38,7 +39,7 @@
</div>
<!--- Panel 1 - Table Orders -->
<div class="tab-pane dining active" id="tables" role="tabpanel">
<div class="tab-pane dining active " id="tables" role="tabpanel">
<div class="card-columns">
<% @tables.each do |table| %>
<% if table.status == 'occupied' %>
@@ -112,6 +113,7 @@
</div>
</div>
</div>
</div>
<!-- tabs - End -->
</div>
<!-- Column One -->
@@ -131,32 +133,33 @@
<div class="card-title">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6">
<p> Receipt No: <span id="receipt_no">
Receipt No: <span id="receipt_no">
<% if @status_sale == 'sale' %>
<%= @sale_array[0].receipt_no rescue '' %>
<% end %>
</span></p>
</span>
<br>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
<p>Date: <span id="receipt_date"><%= @date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %></span>
</p>
Date: <span id="receipt_date"><%= @date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %></span>
<br>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6">
<% if @status_sale == 'sale' %>
<p class="hidden customer-id"><%= @sale_array[0].customer_id rescue '' %></p>
<p>Customer : <%= @sale_array[0].customer.name rescue '' %></p>
Customer : <%= @sale_array[0].customer.name rescue '' %>
<% else %>
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
<p>Customer : <%= @customer.name rescue "" %></p>
Customer : <%= @customer.name rescue "" %>
<% end %>
</div>
</div>
</div>
<div class="card-text order-info">
<div id="order-detail-slimscroll">
<div class="card-text order-info" >
<table class="table table-striped" id="order-items-table">
<thead>
<tr>
@@ -221,6 +224,7 @@
</tbody>
</table>
</div>
</div>
<div class="card-footer">
<table class="table" id="order-charges-table" border="0">
<tr>

View File

@@ -19,7 +19,7 @@
</li>
</ul>
<!-- Nav tabs - End -->
<div id="custom-slimscroll">
<div class="tab-content">
<!--- Panel 0 - Completed Orders -->
<div class="tab-pane " id="completed" role="tabpanel" style="max-height:600px; overflow:auto">
@@ -115,6 +115,7 @@
</div>
</div>
</div>
<!-- tabs - End -->
</div>
<!-- Column One -->

View File

@@ -18,13 +18,14 @@
<p>Date: <span id="receipt_date"> <%=@sale_data.receipt_date.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span></p>
</div>
</div>
<div id="order-detail-slimscroll">
<div class="card-text dining">
<table class="table table-default" id="order-items-table">
<thead>
<tr>
<th class="item-name">Items</th>
<th class="item-attr">QTY</td>
<th class="item-attr">Price</td>
<th class="item-attr">QTY</th>
<th class="item-attr">Price</th>
</tr>
</thead>
<tbody>
@@ -53,6 +54,7 @@
</tbody>
</table>
</div>
</div>
<div class="card-footer">
<table class="table" id="order-charges-table" border="0">
<tr>

View File

@@ -46,7 +46,9 @@
</div>
</div>
<div class="card-text" style="min-height:500px; max-height:500px; overflow-x:scroll">
<div id="order-detail-slimscroll">
<!-- <div class="card-text" style="min-height:500px; max-height:500px; overflow-x:scroll"> -->
<div class="card-text">
<table class="table " id="order-items-table">
<thead>
<tr>
@@ -93,6 +95,7 @@
</tbody>
</table>
</div>
</div>
<div class="card-footer">
<table class="table" id="order-charges-table" border="0">
<tr>

View File

@@ -19,7 +19,7 @@
</li>
</ul>
<!-- Nav tabs - End -->
<div id="custom-slimscroll">
<div class="tab-content" >
<!--- Panel 0 - Completed Orders -->
<div class="tab-pane dining" id="completed" role="tabpanel">
@@ -112,7 +112,7 @@
<% end %>
</div>
</div>
</div>
</div>
<!-- tabs - End -->
</div>

View File

@@ -19,7 +19,7 @@
</li>
</ul>
<!-- Nav tabs - End -->
<div id="custom-slimscroll">
<div class="tab-content">
<!--- Panel 0 - Completed Orders -->
<div class="tab-pane active" id="completed" role="tabpanel" style="max-height:600px; overflow:auto">
@@ -100,6 +100,7 @@
</div>
</div>
</div>
<!-- tabs - End -->
</div>
<!-- Column One -->