Skip to content
Snippets Groups Projects
Commit 4decaeca authored by aydreeihn's avatar aydreeihn
Browse files

Web Portal Fixes:

- Add space between column headers and sort arrow
- Fix sorting by 'Subject' column
- Fix redactor issues with 'Reset' button
	- Make sure text within redactor is cleared correctly
	- Make sure we don't keep attachments if Reset
- Make sure redactor is reinitialized where needed
parent 998581e8
No related branches found
No related tags found
No related merge requests found
......@@ -201,19 +201,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 #');?>&nbsp;<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');?>&nbsp;<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');?>&nbsp;<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');?>&nbsp;<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');?>&nbsp;<i class="icon-sort"></i></a>
</th>
</tr>
</thead>
......
......@@ -94,6 +94,7 @@ RedactorPlugins.draft = function() {
// No change yet — dont't show the button
return;
}
this.$box.find('textarea').attr('data-draft-id', this.opts.draftId);
if (data && this.code.get()) {
this.$draft_saved.show().delay(5000).fadeOut();
}
......@@ -290,10 +291,20 @@ $(function() {
var reset = $('input[type=reset]', el.closest('form'));
if (reset) {
reset.click(function() {
if (el.hasClass('draft'))
el.redactor('deleteDraft');
else
el.redactor('set', '', false, false);
var file = $('.file');
if (file)
file.remove();
if (el.attr('data-draft-id'))
el.redactor('draft.deleteDraft').attr('data-draft-id', '');
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() {
......@@ -301,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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment