1require(['/sites/default/themes/common/js/common/dialog/Plain.js'], function () { 2 /** 3 * Class for the DOI-Dialog 4 */ 5 gm_dialog_DoiRepeat = new Class({ 6 Extends: gm_dialog_Plain 7 8 , options: { 9 hasCloseButton: true 10 } 11 , redirectUrl: null 12 13 , initialize: function (title, message, redirectUrl, redirectOnCancel=false) { 14 this.parent(title, message); 15 this.redirectUrl = redirectUrl; 16 17 this.addEvent('okay', this.__sendDoi.bind(this)); 18 if (redirectOnCancel) { 19 this.addEvent('cancel', this._redirect.bind(this)); 20 } else { 21 this.addEvent('cancel', this.close.pass(true, this)); 22 } 23 } 24 25 , _redirect: function () { 26 var hash = window.location.hash; 27 if (!this.redirectUrl || (hash.indexOf('#') !== -1 && $$('.communitypage.spa').length) ||($$('.communitypage.spa').length && this.redirectUrl=='#')) { 28 this.close(true); 29 } else { 30 new URI(this.redirectUrl).go(); 31 } 32 } 33 34 , __sendDoi: function () { 35 this._showWaitOverlay() 36 this.fireEvent('close') 37 const displaySuccess = () => { 38 var dialogDoi = new gm_dialog_Plain(successDialog.repeatdoiForm.title, successDialog.repeatdoiForm.message, { redirectOnClose: this.redirectUrl }) 39 gm_DialogHandler.add(dialogDoi) 40 } 41 new gm_Request({ 42 url: '/' + languagePath + '/api/user/profile/repeatdoi' 43 , onStatusOkay: function (data) { 44 displaySuccess() 45 }.bind(this) 46 }).post({ type: 'repeatdoi' }) 47 return false 48 } 49 50 , close: function (closeMe) { 51 if (typeOf(closeMe) === 'boolean') { 52 this.parent(); 53 } 54 } 55 }); 56});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.