app/assets/javascripts/swim.js.coffee in speedo-0.2.0 vs app/assets/javascripts/swim.js.coffee in speedo-0.2.5
- old
+ new
@@ -1,80 +1,53 @@
$ ->
-
- # For Web-app mode, uncomment this (and the CSS in style.scss) to make the cols fill the browser
+ # For Web-app mode, uncomment this (and the CSS in speedo/layout.css.scss) to make the cols fill the browser
# $('.col1, .col2, .col3').css('height',$(window).height() - $('.main_nav').outerHeight() - $('.branding').outerHeight() - 60 + 'px')
# $(window).resize ->
# $('.col1, .col2, .col3').css('height',$(window).height() - $('.main_nav').outerHeight() - $('.branding').outerHeight() - 60 + 'px')
-
-
- $('.popup:not(a)').livequery ->
- $(this).overlay()
- $('a.popup').livequery ->
- $(this).overlay
- onBeforeLoad: ->
- wrap = this.getOverlay().find(".wrap")
- wrap.load(this.getTrigger().attr("href"))
-
- $('.modal:not(a)').livequery ->
- $(this).overlay
- mask: '#fff'
- closeOnClick: false
- closeOnEsc: false
+ $('.tip').livequery ->
+ $(@).tooltip()
- $('a.modal').livequery ->
- $(this).overlay
- mask: '#fff'
- closeOnClick: false
- closeOnEsc: false
- onBeforeLoad: ->
- wrap = this.getOverlay().find(".wrap")
- wrap.load(this.getTrigger().attr("href"))
-
$('time.ago').livequery ->
- $(this).timeago()
-
- $('.tip').livequery ->
- $(this).tooltip
- effect: 'slide'
- slideFade: true
- bounce: true
- .dynamic
- direction: 'down'
- bounce: true
-
- $('input[type="date"]').livequery ->
- $(this).datepicker
+ $(@).timeago()
+
+ $('textarea.autogrow').livequery ->
+ $(@).autogrow()
+
+ $('select.chzn').livequery ->
+ $(@).chosen()
+
+ $('input, textarea').livequery ->
+ $(@).placeholder()
+
+ $("select, input:checkbox, input:radio, input:file").livequery ->
+ $(@).not(':hidden').not('.chzn').not('.bare').uniform()
+
+ $('input[type=date]').livequery ->
+ $(@).not('.bare').datepicker
numberOfMonths: 2
dateFormat: 'yy-mm-dd'
showOn: 'focus'
-
- $('textarea.autoGrow').livequery ->
- $(this).autogrow()
-
- $("select:not(.chzn), input:checkbox, input:radio, input:file").not(':hidden').livequery ->
- $(this).uniform()
-
- $('select.chzn').livequery ->
- $(this).chosen()
-
+
+ $("a[data-toggle=modal]").livequery ->
+ $(@).click ->
+ target = $(@).attr('data-target')
+ url = $(@).attr('href')
+ $(target).find('.modal-body').load(url)
+
$('input.autoSuggest').livequery ->
- # $(this).autoSuggest "/path/to/script",
+ # $(@).autoSuggest "/path/to/script",
# minChars: 2
autoSuggestData = [{value: "21", name: "Mick Jagger"},{value: "43", name: "Johnny Storm"},{value: "46", name: "Richard Hatch"}]
- $(this).autoSuggest autoSuggestData,
+ $(@).autoSuggest autoSuggestData,
startText: "AutoSuggesting"
selectedItemProp: "name"
searchObjProps: "name"
-
- $('input, textarea').livequery ->
- $(this).placeholder()
-
-
+
$('.dataTable').livequery ->
- $(this).dataTable
+ $(@).dataTable
"bPaginate": false # Don't paginate
"aaSorting": [] # No initial sorting
- # "bJQueryUI": true # Use jQueryUI styling
- # "aoColumnDefs": [ # Use this to make the final column un-sortable
- # { "bSortable": false, "aTargets": [ -1 ] }
- # ]
+ "aoColumnDefs": [ # Use this to make the final column un-sortable
+ { "bSortable": false, "aTargets": [ -1 ] }
+ ]
+ # "bJQueryUI": true # Use jQueryUI styling