Permalink
Commits on Feb 25, 2018
  1. Bump version to 2.2.0

    dregad committed Feb 25, 2018
  2. Fix js code to show/hide the last context warning

    dregad committed Feb 25, 2018
    The initial version relied on jQuery's siblings() method, to determine
    the number of contexts, but the code does not work when the page is
    processing 2 or more announcements.
    
    To calculate the number, we now go back to the first category row, then
    back down until the next spacer row (or the end of the table), excluding
    deleted contexts.
    
    Fixes #31
  3. Display warning when removing last context

    dregad committed Feb 25, 2018
    Inform the admin that the Announcement will be disabled when they remove
    its last context in the Edit page.
    
    Fixes #31
  4. Show announcements without context as disabled

    dregad committed Feb 25, 2018
    Announcements without any display context will never be displayed. To
    avoid surprising the administrator, any such announcement are indicated
    as being disabled on the list page.
    
    Fixes #30
  5. Center '+' button on Edit Announcements page

    dregad committed Feb 25, 2018
    Fixes #28
  6. Merge branch 'rest'

    dregad committed Feb 25, 2018
    Fixes PR #22
  7. Update changelog and readme files

    dregad committed Feb 20, 2018
    Minimum MantisBT version 2.3.0.
  8. Refactor 'add context' AJAX call to use REST API.

    dregad committed Feb 20, 2018
    Publish a REST API endpoint to replace the corresponding XHR function:
    
    - xmlhttprequest_plugin_announce_add_context
      => ./plugins/Announce/context/{message_id}
  9. Use full REST API URL (with index.php)

    dregad committed Feb 20, 2018
    "Nice" REST API URLs are configured in MantisBT api/rest/.htaccess
    file. If the Apache setup does not allow overrides, then the web server
    will return 404 errors because mod_rewrite is not enabled.
    
    To avoid issues on sites where URL rewriting does not work, we use the
    full URL with index.php for AJAX requests, i.e.
    
        http://example.com/mantis/api/rest/index.php/plugins/Announce/...
    
    instead of the "nice" URL
    
        http://example.com/mantis/api/rest/plugins/Announce/...
  10. Refactor dismiss route as POST

    dregad committed Oct 27, 2017
  11. Use REST API instead of XmlHttpRequest: dismissal

    dregad committed Oct 27, 2017
    XHR was deprecated in Mantis 2.3.0.
    
    Publish a REST API endpoint to replace the corresponding XHR function:
    
    - xmlhttprequest_plugin_announce_dismiss
      => ./plugins/Announce/dismiss/{context_id}
  12. Update changelog

    dregad committed Feb 22, 2018
  13. Define params for AJAX as data attributes

    dregad committed Feb 22, 2018
    The message/context ids were previouly defined in the 'value' attribute,
    which is not valid in img context.
Commits on Feb 22, 2018
  1. Whitespace

    dregad committed Feb 22, 2018
  2. Missing return statement

    dregad committed Feb 22, 2018
  3. PHPDoc

    dregad committed Feb 22, 2018
  4. check_checked() returns void

    dregad committed Feb 22, 2018
  5. check_selected() returns void

    dregad committed Feb 22, 2018
    This caused print_location_option_list() to generate invalid HTML.
    
    Fixes #27
Commits on Feb 20, 2018
  1. Remove unused variable

    dregad committed Jul 6, 2017
  2. Remove useless comment

    dregad committed Jul 6, 2017
  3. Whitespace

    dregad committed Jul 6, 2017
  4. PHPDoc blocks updates

    dregad committed Jul 6, 2017
  5. Do not print announcements

    dregad committed Feb 20, 2018
    Use 'noprint' class to avoid banners showing up in print outs .
    
    Fixes #23
Commits on Feb 19, 2018
  1. Merge branch 'hotfix/2.1.1'

    dregad committed Feb 19, 2018
  2. Bump version to 2.1.1

    dregad committed Feb 19, 2018
  3. Fix display of announcement banner on Admin pages

    dregad committed Feb 19, 2018
    The Admin pages do not have the same HTML structure as the regular
    MantisBT pages, so the javascript that moves the announcement to the
    proper location has no effect.
    
    If there is no "main-content" div, we prepend the announcent to the
    "main-container" div instead.
    
    Fixes #25
Commits on Oct 27, 2017
  1. Fix TTL for non-dismissable announcements

    dregad committed Oct 27, 2017
    Adding a check for TTL in the XmlHttpRequest, so the announcement is
    dismissed when the delay is expired even if the announcement is not
    dismissable by the user.
    
    Fixes #16