Implement tooltips for suppliers table view
This commit is contained in:
@@ -17,10 +17,11 @@
|
||||
// require bootstrap-popover
|
||||
// require bootstrap-typeahead
|
||||
//= require bootstrap
|
||||
//= require mustache
|
||||
//= require handlebars
|
||||
//= require faye
|
||||
//= require supplier/base
|
||||
//= require qwaiter
|
||||
//= require qtip
|
||||
//= require_directory .
|
||||
//= require_self
|
||||
//= require moment
|
||||
@@ -45,3 +46,16 @@ function redirect_to(mapping, variables){
|
||||
function currency(num) {
|
||||
return Qwaiter.currency(num);
|
||||
}
|
||||
|
||||
Handlebars.registerHelper('t', function(tlocation) {
|
||||
return t(tlocation)
|
||||
})
|
||||
Handlebars.registerHelper('currency', function(price) {
|
||||
if(price.fn){
|
||||
price = price.fn(this);
|
||||
}
|
||||
if(typeof(price) == 'function'){
|
||||
price = price.call(this)
|
||||
}
|
||||
return new Handlebars.SafeString(currency(price))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user