From 6e47fbfe41a86827756fc9be2760bfd89bf4a99e Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Wed, 11 Oct 2017 17:53:29 +0630 Subject: [PATCH] update slim scroll --- app/assets/javascripts/application.js | 21 ++ app/assets/stylesheets/application.scss | 13 +- app/views/origami/customers/index.html.erb | 263 +++++++++--------- app/views/origami/discounts/index.html.erb | 6 +- app/views/origami/home/index.html.erb | 4 +- app/views/origami/home/show.html.erb | 24 +- app/views/origami/orders/show.html.erb | 5 +- .../origami/other_charges/index.html.erb | 6 +- .../load_commissioners.html.erb | 5 +- app/views/origami/rooms/show.html.erb | 178 ++++++------ app/views/origami/sales/show.html.erb | 5 +- 11 files changed, 288 insertions(+), 242 deletions(-) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 63c4ad2c..7feea0c4 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -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(); diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 98a1f17c..dec8ca5a 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -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; diff --git a/app/views/origami/customers/index.html.erb b/app/views/origami/customers/index.html.erb index 42a7e5fc..84b78f4a 100644 --- a/app/views/origami/customers/index.html.erb +++ b/app/views/origami/customers/index.html.erb @@ -37,10 +37,10 @@
-
- + + -
+
@@ -101,138 +101,141 @@
-
- <%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %> + +
+
+ <%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %> - - - - - <%= f.error_notification %> - <%= f.hidden_field :id, :class => "form-control col-md-6 " %> -
-
- - <%= f.radio_button :salutation,"Mr", :class => "salutation mr", :value=>"Mr", :style=>"width: 30px"%> - - <%= f.radio_button :salutation,"Mrs", :class => "salutation mrs", :value=>"Mrs", :style=>"width: 30px"%> - - <%= f.radio_button :salutation,"Miss", :class => "salutation miss", :value=>"Miss", :style=>"width: 30px"%> - - <%= f.radio_button :salutation,"Mdm", :class => "salutation mdm", :value=>"Mdm", :style=>"width: 30px"%> -
- -
"> - <%= f.input :name, :class => "form-control col-md-6 name", :required => true %> + + + + + <%= f.error_notification %> + <%= f.hidden_field :id, :class => "form-control col-md-6 " %> +
+
+ + <%= f.radio_button :salutation,"Mr", :class => "salutation mr", :value=>"Mr", :style=>"width: 30px"%> + + <%= f.radio_button :salutation,"Mrs", :class => "salutation mrs", :value=>"Mrs", :style=>"width: 30px"%> + + <%= f.radio_button :salutation,"Miss", :class => "salutation miss", :value=>"Miss", :style=>"width: 30px"%> + + <%= f.radio_button :salutation,"Mdm", :class => "salutation mdm", :value=>"Mdm", :style=>"width: 30px"%> +
- <% flash.each do |name, msg| %> - <% str="[\"#{msg['name']}\"]" - str.gsub!('["', '') - str.gsub!('"]', '') %> - <%= str %> - <% end -%> -
- -
-
- - <%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male", :style=>"width: 30px"%> - - <%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%> -
- -
- <%= f.input :nrc_no, :label => "NRC No",:class => "form-control nrc_no" %> -
-
- <%= f.input :company, :class => "form-control col-md-6 company"%> - - <% flash.each do |name, msg| %> - <% str="[\"#{msg['company']}\"]" - str.gsub!('["', '') - str.gsub!('"]', '') %> - <%= str %> - <% end -%> -
-
"> - <%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%> - - <% flash.each do |name, msg| %> - <% str="[\"#{msg['contact_no']}\"]" - str.gsub!('["', '') - str.gsub!('"]', '') %> - <%= str %> - <% end -%> -
- -
"> - <%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%> - <% flash.each do |name, msg| %> - <% str="[\"#{msg['contact_no']}\"]" - str.gsub!('["', '') - str.gsub!('"]', '') %> - <%= str %> - <% end -%> -
- -
- <%= f.input :address, :class => "form-control col-md-6 address" %> -
- -
- - -
-
- - <%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%> -
- -
- - -
- -
- <%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %> -
- -
"> - <%= f.input :card_no, :class => "form-control col-md-6 card_no"%> - <% flash.each do |name, msg| %> - <% str="[\"#{msg['name']}\"]" - str.gsub!('["', '') - str.gsub!('"]', '') %> - <%= str %> - <% end -%> -
-
- -
- -
+
"> + <%= f.input :name, :class => "form-control col-md-6 name", :required => true %> + + <% flash.each do |name, msg| %> + <% str="[\"#{msg['name']}\"]" + str.gsub!('["', '') + str.gsub!('"]', '') %> + <%= str %> + <% end -%>
-
-
- - -
+
+
+ + <%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male", :style=>"width: 30px"%> + + <%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%> +
+ +
+ <%= f.input :nrc_no, :label => "NRC No",:class => "form-control nrc_no" %> +
+
+ <%= f.input :company, :class => "form-control col-md-6 company"%> + + <% flash.each do |name, msg| %> + <% str="[\"#{msg['company']}\"]" + str.gsub!('["', '') + str.gsub!('"]', '') %> + <%= str %> + <% end -%> +
+
"> + <%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%> + + <% flash.each do |name, msg| %> + <% str="[\"#{msg['contact_no']}\"]" + str.gsub!('["', '') + str.gsub!('"]', '') %> + <%= str %> + <% end -%> +
-
- <%= f.button :submit, "Submit",:class => 'btn bg-blue waves-effect', :id => 'submit_customer' %> - +
"> + <%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%> + <% flash.each do |name, msg| %> + <% str="[\"#{msg['contact_no']}\"]" + str.gsub!('["', '') + str.gsub!('"]', '') %> + <%= str %> + <% end -%> +
+ +
+ <%= f.input :address, :class => "form-control col-md-6 address" %> +
+ +
+ + +
+
+ + <%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%> +
+ +
+ + +
+ +
+ <%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %> +
+ +
"> + <%= f.input :card_no, :class => "form-control col-md-6 card_no"%> + <% flash.each do |name, msg| %> + <% str="[\"#{msg['name']}\"]" + str.gsub!('["', '') + str.gsub!('"]', '') %> + <%= str %> + <% end -%> +
+
+ +
+ +
+
+
+ +
+ + +
+ +
+ <%= f.button :submit, "Submit",:class => 'btn bg-blue waves-effect', :id => 'submit_customer' %> + +
<%end%>
diff --git a/app/views/origami/discounts/index.html.erb b/app/views/origami/discounts/index.html.erb index 89913c8b..a5af5625 100644 --- a/app/views/origami/discounts/index.html.erb +++ b/app/views/origami/discounts/index.html.erb @@ -18,13 +18,14 @@

Date: <%=@sale_data.receipt_date.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

+
- + @@ -53,6 +54,7 @@
ItemsQTY - Price + QTYPrice
+
+
+
+