Sha256: 114f1667643bc9f9df660dc460dc772cb219a9b0be60a11066ebf76840b3e395

Contents?: true

Size: 1.44 KB

Versions: 7

Compression:

Stored size: 1.44 KB

Contents

#= require chosen-jquery
#= require jquery.remotipart
#= require fullstack/ckeditor

$(document).ready ->

  $("select:not([data-remote]):not(.datetime-selector)").chosen()
  $("select[data-remote]").each ->
    $(this).ajaxChosen {method: "GET", url:$(this).data('remote'), dataType: 'json'}, (data) ->
      data

  $("input.taglist").each ->
    taglist = $(this)
    autocomplete_url = taglist.data("autocomplete")
    defaultText = taglist.data("text") || "Add tag"
    taglist.tagsInput
      autocomplete_url: autocomplete_url
      autocomplete: { minLength: 3 },
      defaultText: defaultText, 
      minChars: 3

  $('input.slider').sliderInput()

  $(".on-focus-help").each ->
    self = $(this)
    input = self.parent().find("input")
    input.focus(->
      self.show "fast"
    ).blur ->
      self.hide "fast"
      
  $('input.datepicker').each (i, e) ->
    display = $(this)
    name = display.attr("name")
    display.removeAttr("name")

    input = $("<input name='#{name}' type='hidden' />")
    display.before(input)

    display.datepicker
      altField: input
      altFormat: "yy-mm-dd"
      dateFormat: "d M yy"
      beforeShow: ->
        setTimeout( ( -> $('.ui-datepicker').css("z-index", 9999) ),100);


    if !!display.val()
      display.datepicker("setDate", new Date(display.val()))

    close = $("<a class='close datepicker-cancel'>&times;</a>")
    close.click ->
      display.datepicker("setDate", null)
    display.after(close)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fullstack-admin-0.2.26 app/assets/javascripts/fullstack/admin/src/forms.js.coffee
fullstack-admin-0.2.25 app/assets/javascripts/fullstack/admin/src/forms.js.coffee
fullstack-admin-0.2.24 app/assets/javascripts/fullstack/admin/src/forms.js.coffee
fullstack-admin-0.2.23 app/assets/javascripts/fullstack/admin/src/forms.js.coffee
fullstack-admin-0.2.22 app/assets/javascripts/fullstack/admin/src/forms.js.coffee
fullstack-admin-0.2.21 app/assets/javascripts/fullstack/admin/src/forms.js.coffee
fullstack-admin-0.2.20 app/assets/javascripts/fullstack/admin/src/forms.js.coffee