Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9465

Replace Inline Javascript with External Javascript

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      As discussed in http://ofbiz.markmail.org/thread/ti54omjdt4fy662m inline javascript for various macros like renderLookupField, makeHyperlinkString,shortDateInput etc in HtmlFormMacroLibrary.ftl should be replaced with a generic code written as external javascript. Generic Javascript code should be written in OfbizUtil.js and appropriate classes or identifiers should be used for applying that. Any additional data can be passed with HTML 5 custom data attribute (https://www.w3.org/TR/2011/WD-html5-20110525/elements.html#embedding-custom-non-visible-data-with-the-data-attributes).

      As suggested by Jacques in https://s.apache.org/y8P1 will introduce require.js for the split javascript files in a sub-task.

      Attachments

        1. OFBIZ-9465_example.patch
          2 kB
          Aditya Sharma
        2. OFBIZ-9465_example.patch
          3 kB
          Aditya Sharma
        3. OFBIZ-9465.patch
          6 kB
          Aditya Sharma
        4. OFBIZ-9465.patch
          6 kB
          Aditya Sharma
        5. OFBIZ-9465.patch
          24 kB
          Aditya Sharma
        6. OFBIZ-9465.patch
          3 kB
          Aditya Sharma

        Issue Links

          Activity

            People

              adityasharma Aditya Sharma
              adityasharma Aditya Sharma
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: