Created
February 13, 2017 02:26
-
-
Save xecutioner/83e3e6d06ef8e5ded1443880b80d909c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class @DateParameter | |
constructor: -> | |
that = @ | |
@date = $('.date') | |
@date.on 'click', (e) -> | |
@parent_date=this.parentNode; | |
unless @parent_date.classList.contains("notmonth") | |
reload_display this.innerHTML | |
$(".date").unbind("click"); | |
else | |
alert("Only current month is viewable") | |
reload_display = (date) -> | |
month = document.getElementById('current_month').innerHTML | |
$.ajax | |
datatype: 'json' | |
data:{ | |
date: date+'/'+month}, | |
url: '/timetracks/reload_display' | |
$(document).ready -> | |
date_params = new DateParameter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment