• Topic
  • Discussion
  • OATWikiWeb.OATDOCanchor(Last) -- Owiki? , 2016-08-19 14:58:49 Edit owiki 2016-08-19 14:58:49

    anchor.js

    Enhanced Anchor tag.

    Functions

    OAT.Anchor.assign(anchor, options)

    Modifies anchor element so it acts like Enhanced Anchor: when activated, it displays some additional data in lookup bubble. The lookup bubble is an instance of OAT.Win object - so it can be styled the same way: use predefined OAT.Winstyles or use its own via template. Options are the following:

    • href - String, url of requested data. When false,anchor inherits this value from the href attribute.
    • connection - OAT.Connection object
    • datasource -OAT.DataSource object
    • *result_control* - "grid", "timeline" or "form". Default is grid. Use false for common window.
    • content - node to be inserted (for example,OAT.Dom.text() can be used for raw text).
    • status - string to be inserted into status line
    • title - string to be in the title area of the window
    • activation - "hover", "click", "dblclick" or "focus"
    • width , height - dimensions of lookup window (false is like 'auto' in CSS)
    • elm - anchor node (use when other than current)
    • newHref - new 'href' attribute of theanchor, defaults to 'javascript:void(0)'
    • type - Window style type (default OAT.WinData.RECT). (See OAT.Win for other types.)
    • template - custom type data. (See OAT.Win for details.)
    • visibleButtons - default "cr". (See OAT.Win for details.)
    • enabledButtons - default "cr". (See OAT.Win for details.)

    OAT.Anchor.close(element, recursive)

    Closes selected a++ window. The main point of this method is that it can be called from anywhere, so we do not have to use the close button of the window itself.

    • element - any element inside the a++ or the a++ container itself.
    • recursive - (optional) if the anchor is inside of another window, close all parents recursively.

    Example

    var options = {
            title:"Title text",
            content:OAT.Dom.text("Content text"),
            status:"Status text",
            result_control:false,
            activation: "hover",
            type:OAT.WinData.TYPE_MAC
    }
    OAT.Anchor.assign("elementID", options);
    

    Referenced by...