cleanup
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
||||
// listed below.
|
||||
//
|
||||
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
||||
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
||||
//
|
||||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||
// the compiled file.
|
||||
//
|
||||
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
||||
// GO AFTER THE REQUIRES BELOW.
|
||||
//
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
// require jquery-ui
|
||||
//= require_directory .
|
||||
//= require_self
|
||||
@@ -1,12 +0,0 @@
|
||||
jQuery ->
|
||||
$("a[rel=popover]").popover()
|
||||
$(".tooltip").tooltip()
|
||||
$("a[rel=tooltip]").tooltip()
|
||||
$('input.currency').each(->
|
||||
obj = $(this)
|
||||
original_width = obj.width()
|
||||
obj.wrap("<div class='input-prepend'>")
|
||||
currency_sign = $("<span class='add-on'>€</span>")
|
||||
obj.before(currency_sign)
|
||||
obj.css('width', (original_width - currency_sign.outerWidth())+'px')
|
||||
)
|
||||
@@ -1,44 +0,0 @@
|
||||
window.Qwaiter=
|
||||
alert: (msg) ->
|
||||
$('.modal').modal('hide')
|
||||
template = @mustache('#alert-template', {title: 'Alert', message: msg, close: 'OK'})
|
||||
$(template).modal()
|
||||
false
|
||||
confirm: (options) ->
|
||||
options ||= {}
|
||||
content = options.content || 'Are you sure?'
|
||||
title = options.title || 'Confirm'
|
||||
wrapper = $('<div class="modal"></div>')
|
||||
if typeof(options.ok) == 'function'
|
||||
callback_wrapper = ->
|
||||
wrapper.modal('hide')
|
||||
options.ok()
|
||||
callback_cancel_wrapper = ->
|
||||
wrapper.modal('hide')
|
||||
options.cancel() if options.cancel
|
||||
header = $('<div class="modal-header"></div>')
|
||||
.append('<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>')
|
||||
.append('<h3>'+title+'</h3>').appendTo(wrapper)
|
||||
body = $('<div class="modal-body"></div>').append('<p>'+content+'</p>').appendTo(wrapper)
|
||||
ok_button = $('<a href="#" class="btn btn-primary confirm-ok">Yes</a>')
|
||||
if typeof(options.ok) == 'function'
|
||||
ok_button.click(callback_wrapper)
|
||||
else
|
||||
ok_button.click ->
|
||||
eval(options.ok)
|
||||
wrapper.modal('hide')
|
||||
footer = $('<div class="modal-footer"></div>')
|
||||
.append($('<a href="#" class="btn confirm-cancel">Close</a>').click(callback_cancel_wrapper))
|
||||
.append(ok_button)
|
||||
.appendTo(wrapper)
|
||||
wrapper.modal()
|
||||
currency: (num) ->
|
||||
num = 0.0 if isNaN(num) || num == '' || num == null
|
||||
'€ ' + parseFloat(num).toFixed(2)
|
||||
mustache: (selector, locals)->
|
||||
locs = $.extend(locals,
|
||||
currency: ->
|
||||
(val)->
|
||||
currency(Mustache.render(val, this))
|
||||
)
|
||||
Mustache.to_html($(selector).html(), locs)
|
||||
@@ -1,6 +1,6 @@
|
||||
#= require jquery
|
||||
#= require jquery_ujs
|
||||
#= require ./app/application
|
||||
#= require ./app/manifest
|
||||
#= require foundation
|
||||
#= require moment
|
||||
#= require jquery-ui/datepicker
|
||||
|
||||
Reference in New Issue
Block a user