Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-2280

Refactor maximum length checking in the view layer

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Non-Essential
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Platform 2.0.0
    • Component/s: None
    • Labels:
    • Complexity:
      Low

      Description

      In encounterTypeForm.jsp and visitTypeForm.jsp there's a (duplicated) snippet of javascript code that limits a text area to a maximum length.

      We should refactor and generalize this code so that it can be re-used in other places.

      For example make a function in openmrs.js that takes a jquery selector and a length, and applies length-limiting to that element, but also gives some visual feedback that you've hit this.

      Also, since TRUNK-2471 has been implemented, we should get rid of the hard-coded length limit in the JSP page.

        Attachments

        1. 04-10-2014(1).png
          04-10-2014(1).png
          14 kB
        2. counter.png
          counter.png
          13 kB
        3. error_display.png
          error_display.png
          15 kB
        4. errorscreen.png
          errorscreen.png
          24 kB
        5. user-input-limit.png
          user-input-limit.png
          52 kB

          Activity

            People

            Assignee:
            thilo Thilo Beckmann
            Reporter:
            darius Darius Jazayeri
            Designated Committer:
            Rafal Korytkowski
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 2 days
                2d