{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/riFeedback.ts"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","4","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","__webpack_exports__","jquery__WEBPACK_IMPORTED_MODULE_0__","Feedback","riSendFeedback","to","jName","jMail","jFeedback","validName","_validateRequireInput","validMail","_isEmail","validFeedback","escapeHTML","str","text","html","body","val","location","toString","show","find","each","this","attr","contentType","url","_spPageContextInfo","siteAbsoluteUrl","method","headers","accept","content-type","X-RequestDigest","JSON","stringify","properties","__metadata","type","To","results","Subject","Body","then","hide","riClearFeedback","removeAttr","riPositionFeedback","css","jParent","offsetParent","top","position","absTop","height","outerHeight","is","jWorkspace","newAbsTop","Math","max","jInput","removeClass","addClass","jMailInput","email","test","resize"],"mappings":"aACA,SAAAA,EAAAC,GAQA,IAPA,IAMAC,EAAAC,EANAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAIAM,EAAA,EAAAC,KACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,EACAO,OAAAC,UAAAC,eAAAC,KAAAV,EAAAH,KACAc,EAAAd,GAAAG,EAAAH,IAKA,IAFAe,KAAAhB,GAEAO,EAAAC,QACAD,EAAAU,OAAAV,GAOA,OAHAW,EAAAR,KAAAS,MAAAD,EAAAb,OAGAe,IAEA,SAAAA,IAEA,IADA,IAAAC,EACAf,EAAA,EAAiBA,EAAAY,EAAA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D,KACAD,EAAAD,SAAA,YACA,IAIA9D,EAhHA,GAkHAD,EAACJ,QAAAuE,OAAA,WACDlE,EAAA8C,uBAEAnD,OAAA,eAAAK,EAAAC,eACAN,OAAA,gBAAAK,EAAA4C,gBACe9C,EAAA,eACf,IAAAH,OAAA,yCACAA,OAAA","file":"riFeedback.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t4: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackRUBServiceportal1741103924815\"] = window[\"webpackRUBServiceportal1741103924815\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([790,1,0]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import * as $ from 'jquery';\r\nvar Feedback = (function () {\r\n function Feedback() {\r\n }\r\n Feedback.riSendFeedback = function () {\r\n var to = $(\"#riFeedback\").data('to') || 'i:0#.w|ruhr-uni-bochum\\\\servixd5';\r\n var jName = $('#riFeedbackNameInput');\r\n var jMail = $('#riFeedbackMailInput');\r\n var jFeedback = $('#riFeedbackTextInput');\r\n var validName = Feedback._validateRequireInput(jName);\r\n var validMail = Feedback._validateRequireInput(jMail) && Feedback._isEmail(jMail);\r\n var validFeedback = Feedback._validateRequireInput(jFeedback);\r\n var escapeHTML = function (str) {\r\n return $('
')\r\n .text(str)\r\n .html();\r\n };\r\n if (validName && validMail && validFeedback) {\r\n var body = '

Neues Feedback erhalten von ' +\r\n escapeHTML(jName.val()) +\r\n '

Mailadresse: ' +\r\n jMail.val() +\r\n '

URL: ' +\r\n window.location.toString() +\r\n '

Feedback

' +\r\n escapeHTML(jFeedback.val()) +\r\n '

';\r\n var subject = 'RUB Serviceportal - Neues Feedback';\r\n $('#riFeedback .riLoading').show();\r\n $('#riFeedbackForm')\r\n .find('input, textarea')\r\n .each(function () {\r\n $(this).attr('disabled', 'disabled');\r\n });\r\n $.ajax({\r\n contentType: 'application/json',\r\n url: _spPageContextInfo.siteAbsoluteUrl + '/_api/SP.Utilities.Utility.SendEmail',\r\n method: 'POST',\r\n headers: {\r\n accept: 'application/json;odata=verbose',\r\n 'content-type': 'application/json;odata=verbose',\r\n 'X-RequestDigest': $('#__REQUESTDIGEST').val(),\r\n },\r\n data: JSON.stringify({\r\n properties: {\r\n __metadata: { type: 'SP.Utilities.EmailProperties' },\r\n To: { results: [to] },\r\n Subject: subject,\r\n Body: body,\r\n },\r\n }),\r\n }).then(function (data) {\r\n $('#riFeedback .riLoading').hide();\r\n $('#riFeedbackSend').show();\r\n $('#riFeedbackForm').hide();\r\n $('#riFeedbackError').hide();\r\n }, function () {\r\n $('#riFeedback .riLoading').hide();\r\n $('#riFeedbackSend').hide();\r\n $('#riFeedbackForm').hide();\r\n $('#riFeedbackError').show();\r\n });\r\n }\r\n return false;\r\n };\r\n Feedback.riClearFeedback = function () {\r\n $('#riFeedbackForm')\r\n .find('input, textarea')\r\n .each(function () {\r\n $(this).removeAttr('disabled');\r\n });\r\n $('#riFeedbackSend').hide();\r\n $('#riFeedbackForm').show();\r\n Feedback.riPositionFeedback();\r\n };\r\n Feedback.riPositionFeedback = function () {\r\n var jFeedback = $('#riFeedback');\r\n if (jFeedback.length == 0)\r\n return;\r\n jFeedback.css('top', '');\r\n var jParent = jFeedback.offsetParent();\r\n var top = jFeedback.position().top;\r\n var absTop = top;\r\n var height = jFeedback.outerHeight();\r\n do {\r\n absTop += jParent.position().top;\r\n jParent = jParent.offsetParent();\r\n } while (!jParent.is('html'));\r\n var jWorkspace = $('#s4-workspace');\r\n var maxY = $('html').height();\r\n var newAbsTop = maxY - height;\r\n if (newAbsTop < absTop) {\r\n jFeedback.css('top', Math.max(-1 * absTop + top + jWorkspace.position().top, newAbsTop - (absTop - top)));\r\n }\r\n };\r\n Feedback._validateRequireInput = function (jInput) {\r\n jInput.removeClass('riError');\r\n if (!jInput.val()) {\r\n jInput.addClass('riError');\r\n return false;\r\n }\r\n return true;\r\n };\r\n Feedback._isEmail = function (jMailInput) {\r\n jMailInput.removeClass('riError');\r\n var email = jMailInput.val();\r\n var regex = /^([a-zA-Z0-9_.+-])+\\@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\r\n if (!regex.test(email)) {\r\n jMailInput.addClass('riError');\r\n return false;\r\n }\r\n return true;\r\n };\r\n return Feedback;\r\n}());\r\n$(window).resize(function () {\r\n Feedback.riPositionFeedback();\r\n});\r\nwindow['riSendFeedback'] = Feedback.riSendFeedback;\r\nwindow['riClearFeedback'] = Feedback.riClearFeedback;\r\nexport default Feedback;\r\nif (typeof window['NotifyScriptLoadedAndExecuteWaitingJobs'] != 'undefined') {\r\n window['NotifyScriptLoadedAndExecuteWaitingJobs']('rifeedback.js');\r\n}\r\n"],"sourceRoot":""}