diff --git a/include/client/tickets.inc.php b/include/client/tickets.inc.php index 9e678e31cbaa4a2ff9fec9d63fcb38ed172540b9..8c90e18216155cf9ed9cde53a54833e4449a9719 100644 --- a/include/client/tickets.inc.php +++ b/include/client/tickets.inc.php @@ -205,19 +205,19 @@ if ($closedTickets) {?> <thead> <tr> <th nowrap> - <a href="tickets.php?sort=ID&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Ticket ID"><?php echo __('Ticket #');?><i class="icon-sort"></i></a> + <a href="tickets.php?sort=ID&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Ticket ID"><?php echo __('Ticket #');?> <i class="icon-sort"></i></a> </th> <th width="120"> - <a href="tickets.php?sort=date&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Date"><?php echo __('Create Date');?><i class="icon-sort"></i></a> + <a href="tickets.php?sort=date&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Date"><?php echo __('Create Date');?> <i class="icon-sort"></i></a> </th> <th width="100"> - <a href="tickets.php?sort=status&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Status"><?php echo __('Status');?><i class="icon-sort"></i></a> + <a href="tickets.php?sort=status&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Status"><?php echo __('Status');?> <i class="icon-sort"></i></a> </th> <th width="320"> - <a href="tickets.php?sort=subj&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Subject"><?php echo __('Subject');?><i class="icon-sort"></i></a> + <a href="tickets.php?sort=subject&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Subject"><?php echo __('Subject');?> <i class="icon-sort"></i></a> </th> <th width="120"> - <a href="tickets.php?sort=dept&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Department"><?php echo __('Department');?><i class="icon-sort"></i></a> + <a href="tickets.php?sort=dept&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Department"><?php echo __('Department');?> <i class="icon-sort"></i></a> </th> </tr> </thead> diff --git a/js/redactor-osticket.js b/js/redactor-osticket.js index 12a496c98825195224f72a12c1faed684e9dbc2f..da4b1c203277c2c696520f1a60d870c6138636e8 100644 --- a/js/redactor-osticket.js +++ b/js/redactor-osticket.js @@ -291,10 +291,20 @@ $(function() { var reset = $('input[type=reset]', el.closest('form')); if (reset) { reset.click(function() { + var file = $('.file'); + if (file) + file.remove(); if (el.attr('data-draft-id')) el.redactor('draft.deleteDraft').attr('data-draft-id', ''); - else - el.redactor('insert.set', '', false, false); + else { + try { + el.redactor('insert.set', '', false, false); + } + catch (error) { + el.redactor(); //reinitialize redactor + el.redactor('insert.set', '', false, false); + } + } }); } $('input[type=submit]', el.closest('form')).on('click', function() { @@ -302,7 +312,13 @@ $(function() { // where Redactor does not sync properly after adding an image. // Therefore, the ::get() call will not include text added after // the image was inserted. - el.redactor('code.sync'); + try { + el.redactor('code.sync'); + } + catch (error) { + el.redactor(); //reinitialize redactor + el.redactor('code.sync'); + } }); if (!$.clientPortal) { options['plugins'] = options['plugins'].concat( diff --git a/scp/js/scp.js b/scp/js/scp.js index 5092f7175aad8a9b8aa565df83775f53d9cbab00..82372a9f9ca1f64d76a06f2a16a5867b14044124 100644 --- a/scp/js/scp.js +++ b/scp/js/scp.js @@ -378,7 +378,8 @@ var scp_prep = function() { $('input[name^='+attr+']', ui.item.parent('tbody')).each(function(i, el) { $(el).val(i + 1 + offset); }); - } + }, + 'cancel': ':input,button,div[contenteditable=true]' }); // Scroll to a stop or top on scroll-up click