Skip to content

Commit

Permalink
chore(webpack): include build files
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Feb 2, 2019
1 parent bb3709f commit f53c1de
Show file tree
Hide file tree
Showing 10 changed files with 197,402 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ coverage.html
*.bk
apidocs
/docs/*.html
/public/js/
app.css.map
*.diff
private/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"codacy": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --recursive -R spec && cat ./coverage/lcov.info | cross-env CODACY_PROJECT_TOKEN=65070aca43cc4fba96eaabd4033c9528 codacy-coverage && rm -rf ./coverage",
"webpackwatch": "webpack --config webpack.config.js --watch",
"webpackdev": "webpack --config webpack.config.js",
"webpackdist": "webpack --env.production -p --config webpack.config.js",
"webpackdist": "rimraf public/js/* && webpack --env.production -p --config webpack.config.js",
"snyk-protect": "snyk protect"
},
"dependencies": {
Expand Down
153 changes: 153 additions & 0 deletions public/js/0.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
;(window.webpackJsonp = window.webpackJsonp || []).push([
[0],
{
50: function (module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__
;(__WEBPACK_AMD_DEFINE_ARRAY__ = [
__webpack_require__(0),
__webpack_require__(1),
__webpack_require__(37),
__webpack_require__(52),
__webpack_require__(8),
__webpack_require__(22)
]),
void 0 ===
(__WEBPACK_AMD_DEFINE_RESULT__ = function ($, _, socketClient, md, helpers) {
var st = {}
function onRemoveAttachmentClick (e) {
var self = $(e.currentTarget)
if (_.isUndefined(self)) return !0
var ticketId = $('#__ticketId').html(),
attachmentId = self.attr('data-attachmentId')
attachmentId.length > 0 &&
ticketId.length > 0 &&
$.ajax({
url: '/api/v1/tickets/' + ticketId + '/attachments/remove/' + attachmentId,
type: 'DELETE',
success: function () {
socketClient.ui.refreshTicketAttachments(ticketId)
},
error: function (err) {
var res = err.responseJSON
console.log('[trudesk:singleTicket:onRemoveAttachmentClick] - ' + res.error),
helpers.UI.showSnackbar(res.err, !0)
}
})
}
function onRemoveCommentClick (e) {
var self = $(e.currentTarget)
if (_.isUndefined(self)) return !0
var ticketId = $('#__ticketId').html(),
commentId = self.attr('data-commentId')
commentId.length > 0 && ticketId.length > 0 && socketClient.ui.removeComment(ticketId, commentId)
}
function onRemoveNoteClick (e) {
var self = $(e.currentTarget)
if (_.isUndefined(self)) return !0
var ticketId = $('#__ticketId').html(),
noteId = self.attr('data-noteid')
noteId.length > 0 && ticketId.length > 0 && socketClient.ui.removeNote(ticketId, noteId)
}
return (
(st.init = function (callback) {
$(document).ready(function () {
function setupImageLink (el) {
var $this = $(el),
src = $this.attr('src')
$this.addClass('hasLinked')
var a = $('<a>')
.addClass('no-ajaxy')
.attr('href', src)
.attr('target', '_blank')
$this.wrap(a)
}
socketClient.chat.updateOnlineBubbles(),
helpers.setupTruTabs($('.tru-tab-selectors').find('.tru-tab-selector')),
$('.off-canvas-bottom').DivResizer({}),
$('.issue-body img:not(.hasLinked)').each(function () {
setupImageLink(this)
}),
$('.comment-body img:not(.hasLinked)').each(function () {
setupImageLink(this)
}),
$('.remove-attachment').each(function () {
var self = $(this)
self.off('click', onRemoveAttachmentClick), self.on('click', onRemoveAttachmentClick)
}),
$('.remove-comment').each(function () {
var self = $(this)
self.off('click', onRemoveCommentClick), self.on('click', onRemoveCommentClick)
}),
$('.remove-note').each(function () {
var self = $(this)
self.off('click', onRemoveNoteClick), self.on('click', onRemoveNoteClick)
})
var issueText = $('.issue-text')
.find('div.issue-body')
.html()
_.isUndefined(issueText) ||
((issueText = (issueText = md(issueText)).trim()), $('#issueText').val(issueText))
var editCommentForm = $('div.edit-comment-form')
editCommentForm.find('form').each(function (idx, f) {
var form = $(f)
form.unbind('submit'),
form.submit(function ($event) {
if (($event.preventDefault(), !form.isValid(null, null, !1))) return !0
var id = $('#__ticketId').html()
if (id.length > 0) {
var comment = $($event.currentTarget)
.find('textarea#commentText')
.val(),
commentId = $($event.currentTarget).attr('data-commentId')
socketClient.ui.setCommentText(id, commentId, comment)
}
})
}),
editCommentForm.find('.resetForm').each(function (idx, item) {
var button = $(item)
button.off('click'),
button.on('click', function ($event) {
$event.preventDefault()
var grandParent = button.parents('div.edit-comment-form'),
comment = button.parents('div.ticket-comment').find('.comment-body')
grandParent.length > 0 && (grandParent.addClass('hide'), comment.removeClass('hide'))
})
})
var editNoteForm = $('div.edit-note-form')
if (
(editNoteForm.find('form').each(function (idx, f) {
var form = $(f)
form.off('submit'),
form.on('submit', function ($event) {
if (($event.preventDefault(), !form.isValid(null, null, !1))) return !0
var id = $('#__ticketId').text()
if (id.length > 0) {
var note = $($event.currentTarget)
.find('textarea#noteText')
.val(),
noteId = $($event.currentTarget).attr('data-noteId')
socketClient.ui.setNoteText(id, noteId, note)
}
})
}),
editNoteForm.find('.resetForm').each(function (idx, item) {
var button = $(item)
button.off('click'),
button.on('click', function ($event) {
$event.preventDefault()
var grandParent = button.parents('div.edit-note-form'),
note = button.parents('div.ticket-note').find('.comment-body')
grandParent.length > 0 && (grandParent.addClass('hide'), note.removeClass('hide'))
})
}),
'function' == typeof callback)
)
return callback()
})
}),
st
)
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
}
}
])
Loading

0 comments on commit f53c1de

Please sign in to comment.