 #
 # The full text of the license is available at http://www.gnu.org/copyleft/lesser.html
 
-YD = YAHOO.util.Dom
-OD = ORBEON.util.Dom
 Builder = ORBEON.Builder
+Controls = ORBEON.xforms.Controls
+Document = ORBEON.xforms.Document
 Event = YAHOO.util.Event
 Events = ORBEON.xforms.Events
-Controls = ORBEON.xforms.Controls
+OD = ORBEON.util.Dom
+YD = YAHOO.util.Dom
 
 # For the generic label, generic hint, button's label, and link's label:
 #   Show/hide placeholders

        f$.text '', editablePlaceholderContainer element
    createMock = editableDo 'createMock'
    removeMock = editableDo 'removeMock'
    startEdit = (element) ->
        f$.removeClass 'fb-label-hint-placeholder', element
        f$.removeClass 'xforms-disabled', element                                                                       # Remove disabled which we have on hint when their value is empty

        Builder.mouseExitsGridTdEvent.subscribe () -> currentCell = null
        (element) -> currentCell? and f$.is '*', f$.closest currentCell, element
    pointerOutsideCell = (element) -> not pointerInsideCell element
    isNextSeqNo = (element) ->
        storeSeqNo = parseInt (f$.data 'seqNo', element)
        (currentSeqNo element) == storeSeqNo + 1

    # Actions
    removeFor = (element) -> f$.removeAttr 'for', element                                                               # So on click on the label, the focus isn't set on the input on click
