Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
2.5.0 release - Operator template changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jshah4517 committed Apr 24, 2019
1 parent 64cdee1 commit 8aca65b
Show file tree
Hide file tree
Showing 82 changed files with 1,392 additions and 629 deletions.
Empty file modified assets/operator/css/login.css
100644 → 100755
Empty file.
44 changes: 29 additions & 15 deletions assets/operator/css/main.css
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ pre:not(.moz-signature) {
.row .item50 {
width: 50%;
}
.row .item67 {
width: 66.67%;
}

.row .item:last-child {
padding: 0;
Expand Down Expand Up @@ -1728,17 +1731,34 @@ ul.feedbackStats li .number {

/* Ticket Redactor Plugins (Canned Responses / Self-Service) */

#redactor-modal #redactor-modal-body input[type="text"] {
#redactor-modal.custom-redactor-plugin {
height: calc(100% - 40px);
}

#redactor-modal.custom-redactor-plugin #redactor-modal-body {
height: calc(100% - 57px);
}

#redactor-modal.custom-redactor-plugin #redactor-modal-body input[type="text"] {
height: 30px;
padding: 4px 8px;
}

#redactor-modal section#redactor-modal-cannedResponses {
#redactor-modal.custom-redactor-plugin section#redactor-modal-cannedResponses,
#redactor-modal.custom-redactor-plugin section#redactor-modal-ssLink {
padding: 15px 40px 25px;
height: 100%;
}

#redactor-modal.custom-redactor-plugin section#redactor-modal-cannedResponses {
padding: 15px 40px 25px;
height: calc(100% - 30px);
}

#redactor-modal-cannedResponses .tags-column {
width: 145px;
height: 100%;
overflow-y: auto;
width: 150px;
}

#redactor-modal-cannedResponses .tags-column h3 {
Expand All @@ -1750,17 +1770,12 @@ ul.feedbackStats li .number {
}

#cannedResponseTags {
height: 230px;
list-style: none;
margin: 0;
overflow-y: auto;
padding: 0;
}

#cannedResponseTags.with-language {
height: 160px;
}

#cannedResponseTags li.tag-item {
padding: 2px 0;
}
Expand Down Expand Up @@ -1795,11 +1810,12 @@ ul.feedbackStats li .number {
}

#redactor-modal-cannedResponses .search-column {
max-width: 470px;
width: calc(100% - 185px);
height: 100%;
}

#redactor-modal-body .manage-link {
margin-top: 20px;
margin-top: 15px;
text-align: center;
}

Expand Down Expand Up @@ -2145,16 +2161,14 @@ table.dataTable .truncated-text:before {
ul.redactor-search {
border: 1px solid #ddd;
border-top: 0;
height: 295px;
list-style: none;
margin: 0;
overflow-y: auto;
padding: 0;
}

#selfServiceResults.redactor-search {
height: auto;
max-height: 295px;
#cannedResponseResults.redactor-search, #selfServiceResults.redactor-search {
height: calc(100% - 30px);
}

ul.redactor-search li {
Expand Down Expand Up @@ -2654,4 +2668,4 @@ input.timepicker {
border: 0;
border-top: 1px solid #e9e9e9;
padding: 10px;
}
}
18 changes: 17 additions & 1 deletion assets/operator/css/mobile.css
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ html {
padding-right: 25px;
}

.row .item67 {
width: 100%;
}

.row .item25, .row .item33 {
width: 50%;
}
Expand Down Expand Up @@ -462,6 +466,18 @@ html {
margin-bottom: 15px;
}

#redactor-modal-cannedResponses .search-column {
width: 100%;
}

#redactor-modal-body .selfServiceLang {
float: none;
}

#redactor-modal-body section#redactor-modal-ssLink {
max-height: calc(100% - 30px);
}

}

/*
Expand Down Expand Up @@ -716,4 +732,4 @@ html {
padding-bottom: 46px;
}

}
}
1 change: 1 addition & 0 deletions assets/operator/css/ticket-print.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#sidebar {
border: 0;
float: right;
height: auto;
margin-left: 25px;
position: static;
width: 220px !important;
Expand Down
Binary file removed assets/operator/images/favicon/Thumbs.db
Binary file not shown.
Empty file modified assets/operator/images/favicon/favicon-16x16.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/operator/images/favicon/favicon-32x32.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/operator/images/favicon/favicon.ico
100644 → 100755
Empty file.
Empty file modified assets/operator/images/favicon/mstile-150x150.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/operator/images/operator.gif
Binary file not shown.
10 changes: 5 additions & 5 deletions assets/operator/js/datatable/selectall.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $(function () {
$('.dataTable thead th:first').html('<input type="checkbox" name="select-all" />');

// Toggle all checkboxes
$('input[name="select-all"]').change(function() {
$('input[name="select-all"]').on('change', function() {
// This is the state, after the checkbox has been changed...
var is_checked = $(this).is(':checked');

Expand Down Expand Up @@ -88,15 +88,15 @@ $(function () {
// Check if we're in mobile view
if ($(this).parents('.dataTable').hasClass('collapsed')) {
// Click on the cell and the row, to ensure we have the right state overall
$(this).parent().click();
$(this).parent().parent().click();
$(this).parent().trigger('click');
$(this).parent().parent().trigger('click');
}
})
.on('click', 'td:first-child', function() {
// Check if we're in mobile view
if ($(this).parents('.dataTable').hasClass('collapsed')) {
// Click on the row to ensure we have the right state overall
$(this).parent().click();
$(this).parent().trigger('click');
}
});

Expand All @@ -106,4 +106,4 @@ function getSelectedRows() {
return $('.dataTable tbody tr.selected').map(function() {
return $(this).find('.selector').data("id");
}).get().join(",");
}
}
4 changes: 2 additions & 2 deletions assets/operator/js/department.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ jQuery(function($){
}
});
$('.email-support').each(function() {
$(this).change();
$(this).trigger('change');
});

$('#emailAccounts')
Expand Down Expand Up @@ -266,7 +266,7 @@ jQuery(function($){
$('input[name="registered_only"]').on('change', function () {
$('#registeredOnlyTemplate').toggle();
});

// Convert email template dropdowns to use selectize.
$('.department-templates').find('select').selectize({
plugins: ['disableDelete']
Expand Down
26 changes: 13 additions & 13 deletions assets/operator/js/escalationrule.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,33 +44,33 @@ $(function() {
$(document).on('click', 'label.email-user', function() {
$(this).parent().find('label.exclude-cc').toggle($(this).find(':input').is(':checked'));
});

// Web hooks.
$(document).on('click', '.er-wh-toggle-headers', function (e) {
e.preventDefault();

$(this).next().toggle();
$(this).next().find('textarea.codemirror').each(function () {
codeMirror($(this));
});
});
$(document).on('change', 'select.er-wh-method', function () {
var $wrapper = $(this).parents('tr').find('.er-wh-content');

// Only show content for options listed below.
$wrapper.toggle($.inArray($(this).val(), ['POST','PUT','PATCH']) !== -1);
});
$(document).on('click', '.test-webhook', function (e) {
e.preventDefault();

var route = $(this).data('route'),
$action = $(this).parents('.action'),
getCodeMirror = function ($element) {
var $codemirror = $element.next('.CodeMirror');
if ($codemirror.length) {
return $codemirror[0].CodeMirror.getValue();
}

return '';
},
data = {
Expand All @@ -85,9 +85,9 @@ $(function() {
$action.find('.test-webhook-response')
.removeClass('text-success text-fail')
.html('<i class="fa fa-spinner fa-pulse fa-fw"></i> ' + Lang.get('general.loading') + '...');

$.post(route, data)
.success(function (data) {
.done(function (data) {
$action.find('.test-webhook-response')
.removeClass('text-success text-fail')
.addClass(data.status === 'success' ? 'text-success' : 'text-fail')
Expand All @@ -111,7 +111,7 @@ $(function() {
$('.rule:last .rule-value .action:not(:first)').hide()
.find(':input').prop('disabled', true);

$('.rule:last .rule-action select').change();
$('.rule:last .rule-action select').trigger('change');

// Refresh the sortable option.
$("#sortable").sortable("refresh");
Expand Down Expand Up @@ -158,8 +158,8 @@ $(function() {

// Redactor
element.redactor($.extend($.Redactor.default_opts, opts));
// Save that this element has been initialised, as redactor keeps duplicating

// Save that this element has been initialised, as redactor keeps duplicating
element.data('init', true);
}

Expand Down Expand Up @@ -197,7 +197,7 @@ $(function() {
if ($dropdown.val() == '13') {
initCustomFields($tr, $dropdown.parents('tr').find('.value-id').val());
}

// Pikaday if needed
if ($tr.find('.datepicker').is(':visible')) {
$tr.find('.datepicker').pikaday({ format: $('meta[name=date_format]').prop('content') });
Expand All @@ -213,7 +213,7 @@ $(function() {
$action.find('textarea.codemirror:visible').each(function () {
codeMirror($(this));
});

// Initialise selectize, we have to do this on a per instance basis as the configuration / events is too complex
// to do dynamically.
$action.find('select[name$="[value_text][to][]"], select[name$="[value_text][cc][]"], select[name$="[value_text][bcc][]"]').each(function () {
Expand Down Expand Up @@ -265,4 +265,4 @@ $(function() {
$tr.find('.rule-customfield[data-id="' + id + '"]').show()
.find(':input').prop('disabled', false);
}
});
});
26 changes: 13 additions & 13 deletions assets/operator/js/filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Filtering.getUniqueGroupId = function () {
};

/**
* Remove any condition items that have an empty value dropdown.
* Remove any condition items that have an empty value dropdown.
*
* @param context
*/
Expand Down Expand Up @@ -125,7 +125,7 @@ Filtering.initialise = function () {
})
.get()
.reverse();

// Insert the custom field conditions.
$(customFields).each(function (index, value) {
var condition = parseInt(value.item);
Expand Down Expand Up @@ -172,7 +172,7 @@ Filtering.initialise = function () {
// Disable items in first (hidden) row
$(".conditiongroup:first:not(:visible) :input, .condition:first :input").prop('disabled', true);
$('.conditiongroup .add-condition, .conditiongroup-buttons button').prop('disabled', false);

// If we have default conditions, show them.
if ($('.condition:not(.hide)').length) {
$('.conditiongroup .settings').show();
Expand All @@ -198,12 +198,12 @@ Filtering.initialise = function () {

$(function() {
// Toggle filtering
$('.toggle-filtering').click(function() {
$('.toggle-filtering').on('click', function() {
$('.conditiongroup').toggle();

// If we're toggling to show and it's currently empty, insert new condition
if ($('.conditiongroup').is(':visible') && ! $('.conditiongroup .condition:visible').length) {
$('.conditiongroup .add-condition').click();
$('.conditiongroup .add-condition').trigger('click');
}
});

Expand All @@ -215,7 +215,7 @@ $(function() {
$(document.body).on('change', '.condition-item select', function() {
Filtering.showCondition(this);
});

/**
* Add Condition Group.
*/
Expand Down Expand Up @@ -247,7 +247,7 @@ $(function() {
$('.plan-conditiongroup-type').hide();
}
});

/**
* Remove Condition Group.
*/
Expand All @@ -271,13 +271,13 @@ $(function() {
var $this = $(this).parents('.conditiongroup'),
index = $this.find('.condition-group-id:first').val(); // Take the first ID in the group container - this should be correct
$this.find('.condition-group-id').val(index); // as adding a group should set this value

// Show table
$this.find('.settings').show();

// Disable and hide fields that are not needed now
$this.find('.condition:last .condition-value :input, .condition:last .condition-operator :input').prop('disabled', true).hide();

// Show the right condition options and values
var selected = $this.find('.condition:last .condition-item select').val();
$this.find('.condition:last .condition-value :input[data-item="' + selected +'"]').prop('disabled', false).show();
Expand Down Expand Up @@ -307,13 +307,13 @@ $(function() {
} else {
$(this).parents('.conditiongroup').find('.conditiongroup-type, .condition .remove-button').hide();
}

// Remove the condition row
$(this).parents('.condition').remove();

// Hide table if no conditions left
if ($('.condition:visible').length === 0) {
$('.conditiongroup .settings').hide();
}
});
});
});
Loading

0 comments on commit 8aca65b

Please sign in to comment.