change report filter UI and check focus for datepicker

This commit is contained in:
phyusin
2017-11-28 14:16:25 +06:30
parent ec26c353d2
commit 785541e438
8 changed files with 33 additions and 33 deletions

View File

@@ -107,7 +107,7 @@ $(document).ready(function() {
}
});
$('form:first *:input[type!=hidden]:first').focus();
$('form:first *input[data-behaviour!=datepicker]:input[type!=hidden]:first').focus();
// $(document).on("focus", "[data-behaviour~='datepicker']", function(e){
// $(this).datepicker({"format": "yyyy-M-dd", "weekStart": 1, "autoclose": true});

View File

@@ -1,7 +1,7 @@
<div class="p-l-15">
<%= form_tag report_path, :method => :get, :id => "frm_report", :class => "form" do %>
<%= form_tag report_path, :method => :get, :id => "frm_report", :class => "form" do %>
<% if period_type != false %>
<div class="row">
<div class="row">
<!-- <div class="col-lg-2 col-md-2 col-sm-2">
<label class="">Select Date Range</label>
@@ -12,17 +12,17 @@
<% end %>
</div> -->
<div class="col-lg-3 col-md-3 col-sm-3">
<!-- <label class="">Select Shift Period</label> -->
<label class="font-14"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
</div>
<!-- <label class="">Select Shift Period</label> -->
<label class="font-14"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 34px;">
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 34px;">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14"><%= t :commissioner %></label>
<select class="form-control" name="commissioner" id="commissioner">
<select class="form-control" name="commissioner" id="commissioner" style="height: 37px;">
<option value=""></option>
<% @commissioner.each do |c| %>
<% if @com_id == c.id %>
@@ -34,16 +34,16 @@
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
<br>
<br>
<input type="submit" value="Generate Report" class='btn btn-info wave-effects'>
</div>
<!-- <div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
<input type="button" value="Clear Filter" id="clear_filter" class='btn btn-danger'>
</div> -->
</div>
<% end %>
<% end %>
</div>
<% end %>
<% end %>
</div>
<!-- <script type="text/javascript">
$(document).ready(function () {

View File

@@ -22,15 +22,15 @@
<div class="form-group col-md-2">
<!-- <label class="">Select Shift Period</label> -->
<label class="font-20">From</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 34px;">
</div>
<div class="form-group col-md-2">
<label class="font-20">To</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 34px;">
</div>
<div class="form-group col-md-3">
<label class="font-20">All Shift</label>
<select class="form-control select" name="shift_name" id="shift_name" >
<select class="form-control select" name="shift_name" id="shift_name" style="height: 37px;">
</select>
</div>
<div class="form-group col-md-1 ">

View File

@@ -27,15 +27,15 @@
<div class="col-lg-2 col-md-2 col-sm-2">
<!-- <label class="">Select Shift Period</label> -->
<label class="font-14"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3 from" name="from" id="from" type="text" placeholder="From date">
<input data-behaviour='datepicker' class="form-control datepicker m-t-3 from" name="from" id="from" type="text" placeholder="From date" style="height: 34px;">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3 to" name="to" id="to" type="text" placeholder="To date">
<input data-behaviour='datepicker' class="form-control datepicker m-t-3 to" name="to" id="to" type="text" placeholder="To date" style="height: 34px;">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14"><%= t("views.right_panel.detail.all_shift") %></label>
<select class="form-control select" name="shift_name" id="shift_name" >
<select class="form-control select" name="shift_name" id="shift_name" style="height: 37px;" >
</select>
</div>
<div class="col-lg-1 col-md-1 col-sm-1 margin-top-20">

View File

@@ -27,15 +27,15 @@
<div class="col-lg-2 col-md-2 col-sm-2">
<!-- <label class="">Select Shift Period</label> -->
<label class="font-14"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 33.5px;">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 33.5;">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14"><%= t("views.right_panel.detail.all_shift") %></label>
<select class="form-control select" name="shift_name" id="shift_name" >
<select class="form-control select" name="shift_name" id="shift_name" style="height: 36px;" >
</select>
</div>
<div class="col-lg-1 col-md-1 col-sm-1 margin-top-20">

View File

@@ -21,15 +21,15 @@
<div class="col-lg-3 col-md-3 col-sm-3">
<!-- <label class="font-14">Select Shift Period</label> -->
<label class="font-14"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 34px;">
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 34px;">
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14"><%= t("views.right_panel.detail.all_shift") %></label>
<select class="form-control select" name="shift_name" id="shift_name" >
<select class="form-control select" name="shift_name" id="shift_name" style="height: 37px;" >
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20"><br>

View File

@@ -14,11 +14,11 @@
<div class="col-lg-3 col-md-3 col-sm-3">
<!-- <label class="">Select Shift Period</label> -->
<label class="font-14">From</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 35px;">
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<label class="font-14">To</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 35px;">
</div>
<div class="form-group col-md-4">
<label class="font-14">Definition Item</label>

View File

@@ -22,15 +22,15 @@
<div class="form-group col-lg-2 col-md-2 col-sm-2">
<!-- <label class="">Select Shift Period</label> -->
<label class="font-20"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date">
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 34px;">
</div>
<div class="form-group col-lg-2 col-md-2 col-sm-2">
<label class="font-20"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date">
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 34px;">
</div>
<div class="form-group col-lg-3 col-md-3 col-sm-3">
<label class="font-20"><%= t("views.right_panel.detail.all_shift") %></label>
<select class="form-control select" name="shift_name" id="shift_name" >
<select class="form-control select" name="shift_name" id="shift_name" style="height: 37px;">
</select>
</div>
<div class=" col-lg-1 col-md-1 col-sm-1 margin-top-20">