diff --git a/CHANGES.rst b/CHANGES.rst index 00828e0a1c..f2d055c44c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -21,6 +21,7 @@ Changelog **Fixed** +- #494 Rejection reasons widget does not appear on rejection - #492 Fix AR Add Form: CC Contacts not set on Contact Change - #489 Worksheet Templates selection list is empty in Worksheets view - #490 Fix AR Add Form: No specifications found if a sample type was set diff --git a/bika/lims/browser/js/bika.lims.rejection.js b/bika/lims/browser/js/bika.lims.rejection.js index e7f0092bfc..52f2ac8f71 100644 --- a/bika/lims/browser/js/bika.lims.rejection.js +++ b/bika/lims/browser/js/bika.lims.rejection.js @@ -5,16 +5,6 @@ var that = this; that.load = function() { - // I don't know why samples don't have the reject state button, so I'll - // have to insert a handmade one. - if ($('body').hasClass('portaltype-sample') && - $('#plone-contentmenu-workflow .state-reject').length < 1) { - var url = window.location.href.replace('/base_view',''); - var autentification = $('input[name="_authenticator"]').val(); - // we have to insert the state button - var dom_e = '
  • Reject
  • "'; - $(dom_e).prependTo($('#plone-contentmenu-workflow dd.actionMenuContent ul')[0]); - } // If rejection workflow is disabled, hide the state link var request_data = { catalog_name: "portal_catalog", @@ -59,7 +49,16 @@ var td = $('#archetypes-fieldname-RejectionWidget').parent('td'); var label = "
    "+$(td).prev('td').html().trim()+"
    "; // Creating the div element - $('#content').prepend("
    "); + $('#content').prepend( + ""); // Moving the widget there $('#archetypes-fieldname-RejectionWidget').detach().prependTo('#semioverlay .semioverlay-content'); // hidding the widget's td and moving the label @@ -83,7 +82,6 @@ $('div#semioverlay .semioverlay-panel').fadeOut(); reject_ar_sample(); }); - $('div#semioverlay .semioverlay-panel').hide(); } }