anchor.diff:        @current_rule.str = data
         @summaryUpdate()
         @content.css {"width": "auto"}
  +      @save()
   
       init_calendar_days: (section) =>
         monthly_calendar = section.find(".rs_calendar_day")
  
positive.code: window.RecurringSelectDialog =
    class RecurringSelectDialog
      constructor: (@recurring_selector) ->
        @current_rule = @recurring_selector.recurring_select('current_rule')
        @initDialogBox()
        if not @current_rule.hash? or not @current_rule.hash.rule_type?
          @freqChanged()
        else
          setTimeout @positionDialogVert, 10 # allow initial render
  
      initDialogBox: ->
        $(".rs_dialog_holder").remove()
  
        open_in = $("body")
        open_in = $(".ui-page-active") if $(".ui-page-active").length
        open_in = $(".modal-with-recurring") if $(".modal:visible").length
        open_in.append @template()
        @outer_holder = $(".rs_dialog_holder")
        @inner_holder = @outer_holder.find ".rs_dialog"
        @content = @outer_holder.find ".rs_dialog_content"
        @positionDialogVert(true)
        @mainEventInit()
        @freqInit()
        @summaryInit()
        @outer_holder.trigger "recurring_select:dialog_opened"
        @freq_select.focus()
  
      positionDialogVert: (initial_positioning) =>
        window_height = $(window).height()
        window_width  = $(window).width()
        dialog_height = @content.outerHeight()
        if dialog_height < 80
          dialog_height = 80
        margin_top = (window_height - dialog_height)/2 - 30
        margin_top = 10 if margin_top < 10
        # if dialog_height > window_height - 20
        #   dialog_height = window_height - 20
  
        new_style_hash =
          "margin-top" : margin_top+"px"
          "min-height" : dialog_height+"px"
  
        if initial_positioning?
          @inner_holder.css new_style_hash
          @inner_holder.trigger "recurring_select:dialog_positioned"
        else
          @inner_holder.addClass "animated"
          @inner_holder.animate new_style_hash, 200, =>
            @inner_holder.removeClass "animated"
            @content.css {"width": "auto"}
            @inner_holder.trigger "recurring_select:dialog_positioned"
  
      cancel: =>
        @outer_holder.remove()
        @recurring_selector.recurring_select('cancel')
  
      outerCancel: (event) =>
        if $(event.target).hasClass("rs_dialog_holder")
          @cancel()
  
      save: =>
        return if !@current_rule.str?
        @outer_holder.remove()
        @recurring_selector.recurring_select('save', @current_rule)
  
  # ========================= Init Methods ===============================
  
      mainEventInit: ->
        # Tap hooks are for jQueryMobile
        @outer_holder.on 'click tap', @outerCancel
        @content.on 'click tap', 'h1 a', @cancel
        @save_button = @content.find('input.rs_save').on "click tap", @save
        @content.find('input.rs_cancel').on "click tap", @cancel
  
      freqInit: ->
        @freq_select = @outer_holder.find ".rs_frequency"
  
negative.code:         res
        @current_rule.hash.validations.day_of_week = {}
        @current_rule.hash.validations.day_of_month = raw_days.get()
        @update()
        false
  
      weekOfMonthChanged: (event) =>
  