You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

95 regels
2.3 KiB

  1. Page Structure and Navigation
  2. =============================
  3. Page Structure
  4. --------------
  5. .. data:: page_body
  6. global reference to the :class:`Body`
  7. .. class:: Body()
  8. Created by app.js
  9. .. attribute:: header
  10. Head element
  11. .. attribute:: footer
  12. Footer element
  13. .. attribute:: left_side_bar
  14. Left Sidebar Element
  15. .. attribute:: right_side_bar
  16. Right Sidebar Element
  17. .. attribute:: center
  18. Center content Element
  19. .. attribute:: pages
  20. Dictionary of pages by label
  21. .. attribute:: cur_page
  22. Current page
  23. .. method:: add_page(label, onshow)
  24. Returns a new page (DIV) with label. Optionally `onshow` function will be called when the page is shown
  25. .. method:: change_to(page_name)
  26. Switch to the given page
  27. Opening existing resources (Pages, Forms etc)
  28. ---------------------------------------------
  29. .. function:: loaddoc(doctype, name, onload, menuitem)
  30. Open an exiting record (`doctype`, `name`) from the server or :term:`Locals`
  31. Optionally you can specify onload method and menuitem. If menuitem is specified, it will show the menuitem
  32. as selected whenever the record is reloaded.
  33. .. function:: new_doc(doctype, onload)
  34. Open a new record of type `doctype`
  35. .. function:: loadpage(page_name, call_back, menuitem)
  36. Open the page specified by `page_name`. If menuitem is specified, it will show the menuitem
  37. as selected whenever the page is reloaded.
  38. .. function:: loadreport(doctype, rep_name, onload, menuitem, reset_report)
  39. Open the report builder of the given `doctype`. Optionally if `rep_name` is specified, it will
  40. open the corresponding :term:`Search Criteria` identified by `criteria_name`
  41. History
  42. -------
  43. History is maintained by framgments using the Really Simple History (rsh) library
  44. .. data:: nav_obj
  45. global reference to the history object
  46. .. function:: nav_obj.open_notify(type, p1, p2)
  47. Notify of a new page opening. Add to history
  48. * `type` is either - Form, Report or Page
  49. * `p1` is DocType in case of Form or Report and page name in case of Page
  50. * `p2` is record name in case of DocType, criteria_name in case of Report
  51. .. function:: nav_obj.show_last_open()
  52. Execute `Back` button