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.

page_layout.js 1.9 KiB

13 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com)
  2. //
  3. // MIT License (MIT)
  4. //
  5. // Permission is hereby granted, free of charge, to any person obtaining a
  6. // copy of this software and associated documentation files (the "Software"),
  7. // to deal in the Software without restriction, including without limitation
  8. // the rights to use, copy, modify, merge, publish, distribute, sublicense,
  9. // and/or sell copies of the Software, and to permit persons to whom the
  10. // Software is furnished to do so, subject to the following conditions:
  11. //
  12. // The above copyright notice and this permission notice shall be included in
  13. // all copies or substantial portions of the Software.
  14. //
  15. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
  16. // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  17. // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  18. // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
  19. // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
  20. // OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  21. //
  22. /* standard 2-column layout with
  23. wrapper
  24. + wtab
  25. + main
  26. + head
  27. + toolbar_area
  28. + body
  29. + footer
  30. + sidebar_area
  31. */
  32. wn.PageLayout = function(args) {
  33. $.extend(this, args)
  34. this.wrapper = $a(this.parent, 'div', 'layout-wrapper layout-wrapper-background');
  35. this.head = $a(this.wrapper, 'div');
  36. this.main = $a(this.wrapper, 'div', 'layout-main-section');
  37. this.sidebar_area = $a(this.wrapper, 'div', 'layout-side-section');
  38. $a(this.wrapper, 'div', '', {clear:'both'});
  39. this.main_head = $a(this.main, 'div', 'form-title');
  40. this.body = $a(this.main, 'div');
  41. this.footer = $a(this.main, 'div');
  42. if(this.heading) {
  43. this.page_head = new PageHeader(this.head, this.heading);
  44. }
  45. }