Big Sister Web Application Framework
Functions | Variables
common_menu.js File Reference

Functions

 if (browser.agentIE) document.onmousedown
else if (document.addEventListener) document.addEventListener("mousedown"
function closeMenu ()
function pageMousedown (event)
function openMenu (menu_button, menuName)
function changeMenu (menu_button, menuName)
function closeSubmenu ()
function closeSubmenuOf (name)
function openSubmenu (item, subName)
function clickMenu (menu_button)
function getPageOffsetLeft (obj)
function getPageOffsetTop (obj)
function showContextMenu (id)
function closeContextMenu ()
function getMouseX ()
function getMouseY ()
function replace (string, search, replace)
function encodeArgument (arg)
function contextURI (uri, names, translated)
function openContext (uri, names, translated, window, params)
function getform (form)
function setformvar (form, name, value)
function setformvarsubmit (form, name, value)
function formsubmit (form)
function toggle_flag (form, flag)
 Toggle a (form) flag.
function submit_preventdouble (button, element, value)
 
Disable a button to prevent double-clicking, stores the optional value

in an input field and submits the form.

function show_hourglass (time)
 Show an hourglass after a specified time.
function _start_show_hourglass (fade)
function fade_in (element)
 Fade an element in softly.
function center_element (element)
 Center an element.

Variables

var menuActive = null
var subMenu = null
var subMenuName = ''
var contextMenu = null
var x = 0
var y = 0
else pageMousedown
else true
var _fade_in_element = null
var _fade_in_opacity = 0

Function Documentation

function _start_show_hourglass (   fade)

References center_element(), and fade_in().

function center_element (   element)

Center an element.

The element is supposed to be position: absolute.

Parameters
elementPointer to an element to fade in

References x, and y.

Referenced by _start_show_hourglass().

function changeMenu (   menu_button,
  menuName 
)

References closeMenu(), menuActive, and openMenu().

function clickMenu (   menu_button)

References browser, getPageOffsetLeft(), getPageOffsetTop(), menuActive, x, and y.

Referenced by openMenu().

function closeContextMenu ( )

References contextMenu.

Referenced by closeMenu(), and showContextMenu().

function closeMenu ( )
function closeSubmenu ( )

References subMenu, and subMenuName.

Referenced by closeMenu(), closeSubmenuOf(), and openSubmenu().

function closeSubmenuOf (   name)

References closeSubmenu(), and subMenuName.

function contextURI (   uri,
  names,
  translated 
)

References encodeArgument().

Referenced by openContext(), and SwafAsync().

function encodeArgument (   arg)

References replace().

Referenced by contextURI(), and SwafAsync().

function fade_in (   element)

Fade an element in softly.

This works using opacity. Browsers not supporting oppacity will not actually show an effect - the object just appears. For this to work in Internet Explorer the element must have a given height or width. The element is supposed to be hidden before fading in with "visibility:hidden".

Parameters
elementPointer to an element to fade in.

References _fade_in_element, and browser.

Referenced by _start_show_hourglass().

function formsubmit (   form)

References getform().

Referenced by setformvarsubmit().

function getform (   form)

Referenced by formsubmit(), setformvar(), and toggle_flag().

function getMouseX ( )

References x.

Referenced by showContextMenu().

function getMouseY ( )

References y.

Referenced by showContextMenu().

function getPageOffsetLeft (   obj)

References x.

Referenced by adapt_size(), clickMenu(), openSubmenu(), and select_panel().

function getPageOffsetTop (   obj)

References y.

Referenced by adapt_size(), clickMenu(), openSubmenu(), and select_panel().

if ( browser.  agentIE)
else if ( document.  addEventListener)
function openContext (   uri,
  names,
  translated,
  window,
  params 
)

References closeMenu(), and contextURI().

function openMenu (   menu_button,
  menuName 
)

References clickMenu(), closeMenu(), and menuActive.

Referenced by changeMenu().

function openSubmenu (   item,
  subName 
)
function pageMousedown (   event)
function replace (   string,
  search,
  replace 
)

Referenced by encodeArgument().

function setformvar (   form,
  name,
  value 
)

References getform().

Referenced by setformvarsubmit().

function setformvarsubmit (   form,
  name,
  value 
)

References formsubmit(), and setformvar().

Referenced by setsort(), and setview().

function show_hourglass (   time)

Show an hourglass after a specified time.

This requires the hourglass HTML source (.inc@) to be included on the respective page. If a time argument is given, the hourglass is faded in after waiting time milliseconds. If no time is given, the hourglass is immediately shown without any fading effect.

Parameters
time(optional) Time in milliseconds to wait before displaying the hour glass.
function showContextMenu (   id)
function submit_preventdouble (   button,
  element,
  value 
)

Disable a button to prevent double-clicking, stores the optional value

in an input field and submits the form.

When the button is disabled, its value will not be sent to the server, therefore this function allows to pass a value to a separate input field. If no value and/or element are given, only the form is submitted.

Parameters
buttonA pointer to a button
element(optional) The name of a field that should be set before submitting the form
value(optional) The value that should be stored in the target element
Returns
false
function toggle_flag (   form,
  flag 
)

Toggle a (form) flag.

Finds a flag in a form, sets its value to "0" if it was true before, to "1" if it was false before.

Parameters
form(optional) form as in getform().
flagThe name of the flag or the flag form field itself.

References getform().

Variable Documentation

var _fade_in_element = null

Referenced by fade_in().

var _fade_in_opacity = 0
var contextMenu = null
var menuActive = null
else pageMousedown
var subMenu = null

Referenced by closeSubmenu(), and openSubmenu().

var subMenuName = ''
else true
var x = 0
var y = 0