Merge master branch of base
This commit is contained in:
commit
b5acd9b116
10 changed files with 1925 additions and 75 deletions
|
|
@ -38,6 +38,19 @@ $.fn.sorter = (function(){
|
|||
|
||||
})();
|
||||
|
||||
// allow touch devices to work on click events
|
||||
// http://stackoverflow.com/a/16221066
|
||||
$.fn.extend({ _on: (function(){ return $.fn.on; })() });
|
||||
$.fn.extend({
|
||||
on: (function(){
|
||||
var isTouchSupported = 'ontouchstart' in window || window.DocumentTouch && document instanceof DocumentTouch;
|
||||
return function( types, selector, data, fn, one ) {
|
||||
if (typeof types == 'string' && isTouchSupported && !(types.match(/touch/gi))) types = types.replace(/click/gi, 'touchstart');
|
||||
return this._on( types, selector, data, fn);
|
||||
};
|
||||
}()),
|
||||
});
|
||||
|
||||
// Load following statements, when DOM is ready
|
||||
$(function() {
|
||||
|
||||
|
|
|
|||
|
|
@ -108,17 +108,7 @@ class Ordergroup < Group
|
|||
|
||||
# Make sure, the name is uniq, add usefull message if uniq group is already deleted
|
||||
def uniqueness_of_name
|
||||
id = new_record? ? '' : self.id
|
||||
group = Ordergroup.with_deleted.where('groups.id != ? AND groups.name = ?', id, name).first
|
||||
if group.present?
|
||||
message = group.deleted? ? :taken_with_deleted : :taken
|
||||
errors.add :name, message
|
||||
end
|
||||
end
|
||||
|
||||
# Make sure, the name is uniq, add usefull message if uniq group is already deleted
|
||||
def uniqueness_of_name
|
||||
id = new_record? ? '' : self.id
|
||||
id = new_record? ? nil : self.id
|
||||
group = Ordergroup.where('groups.id != ? AND groups.name = ?', id, name).first
|
||||
if group.present?
|
||||
message = group.deleted? ? :taken_with_deleted : :taken
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class Supplier < ActiveRecord::Base
|
|||
|
||||
# Make sure, the name is uniq, add usefull message if uniq group is already deleted
|
||||
def uniqueness_of_name
|
||||
id = new_record? ? '' : self.id
|
||||
id = new_record? ? nil : self.id
|
||||
supplier = Supplier.where('suppliers.id != ? AND suppliers.name = ?', id, name).first
|
||||
if supplier.present?
|
||||
message = supplier.deleted? ? :taken_with_deleted : :taken
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
%tr{:class => cycle("even","odd", :name => "order")}
|
||||
%td= link_to truncate(order.name), new_finance_order_path(order_id: order.id)
|
||||
%td=h format_time(order.ends) unless order.ends.nil?
|
||||
%td= order.closed? ? t('.cleared', amount: number_to_currency(order.foodcoop_result)) : "beendet"
|
||||
%td= order.closed? ? t('.cleared', amount: number_to_currency(order.foodcoop_result)) : t('.ended')
|
||||
%td= order.updated_by.nil? ? '??' : order.updated_by.nick
|
||||
%td
|
||||
- unless order.closed?
|
||||
|
|
@ -23,4 +23,4 @@
|
|||
= link_to t('.close'), close_direct_finance_order_path(order),
|
||||
:confirm => t('.confirm'), :method => :put, class: 'btn btn-mini'
|
||||
- else
|
||||
%i= t('.no_closed_orders')
|
||||
%i= t('.no_closed_orders')
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
= t '.text', user: @user.nick, link: @link, expires: I18n.l(@user.reset_password_expires)
|
||||
= raw t '.text', user: @user.nick, link: @link, expires: I18n.l(@user.reset_password_expires)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue