Skip to content

Commit

Permalink
KMS-11965 build source js files
Browse files Browse the repository at this point in the history
  • Loading branch information
muli committed Jul 7, 2016
1 parent 7757883 commit 049ed4e
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,27 @@ Y.extend(LTIPANEL, Y.Base, {
}

document.body.bsePopup = bsePopup;
var entrySelectedEvent = new Event('entrySelected');
document.body.myEvent = entrySelectedEvent;
var entrySelectedEvent = this.createEntrySelectedEvent();
document.body.entrySelectedEvent = entrySelectedEvent;
document.body.addEventListener('entrySelected', this.close_popup_callback.bind(this), false);
},

createEntrySelectedEvent: function() {
var entrySelectedEvent;
if(typeof window.CustomEvent === 'function') {
entrySelectedEvent = new CustomEvent('entrySelected');
}
else {
// ie >= 9
entrySelectedEvent = document.createEvent('CustomEvent');
entrySelectedEvent.initCustomEvent('entrySelected', false, false, {});
}

return entrySelectedEvent;
},



/**
* Event handler callback for when a simulated click event is triggered on a specifc element.
*/
Expand Down Expand Up @@ -197,9 +213,23 @@ Y.extend(LTIPANELMEDIAASSIGNMENT, Y.Base, {
}

document.body.bsePopup = bsePopup;
var entrySelectedEvent = new Event('entrySelected');
document.body.myEvent = entrySelectedEvent;
document.body.addEventListener('entrySelected', this.close_popup_callback.bind(this));
var entrySelectedEvent = this.createEntrySelectedEvent();
document.body.entrySelectedEvent = entrySelectedEvent;
document.body.addEventListener('entrySelected', this.close_popup_callback.bind(this), false);
},

createEntrySelectedEvent: function() {
var entrySelectedEvent;
if(typeof window.CustomEvent === 'function') {
entrySelectedEvent = new CustomEvent('entrySelected');
}
else {
// ie >= 9
entrySelectedEvent = document.createEvent('CustomEvent');
entrySelectedEvent.initCustomEvent('entrySelected', false, false, {});
}

return entrySelectedEvent;
},

close_popup_callback: function() {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,27 @@ Y.extend(LTIPANEL, Y.Base, {
}

document.body.bsePopup = bsePopup;
var entrySelectedEvent = new Event('entrySelected');
document.body.myEvent = entrySelectedEvent;
var entrySelectedEvent = this.createEntrySelectedEvent();
document.body.entrySelectedEvent = entrySelectedEvent;
document.body.addEventListener('entrySelected', this.close_popup_callback.bind(this), false);
},

createEntrySelectedEvent: function() {
var entrySelectedEvent;
if(typeof window.CustomEvent === 'function') {
entrySelectedEvent = new CustomEvent('entrySelected');
}
else {
// ie >= 9
entrySelectedEvent = document.createEvent('CustomEvent');
entrySelectedEvent.initCustomEvent('entrySelected', false, false, {});
}

return entrySelectedEvent;
},



/**
* Event handler callback for when a simulated click event is triggered on a specifc element.
*/
Expand Down Expand Up @@ -197,9 +213,23 @@ Y.extend(LTIPANELMEDIAASSIGNMENT, Y.Base, {
}

document.body.bsePopup = bsePopup;
var entrySelectedEvent = new Event('entrySelected');
document.body.myEvent = entrySelectedEvent;
document.body.addEventListener('entrySelected', this.close_popup_callback.bind(this));
var entrySelectedEvent = this.createEntrySelectedEvent();
document.body.entrySelectedEvent = entrySelectedEvent;
document.body.addEventListener('entrySelected', this.close_popup_callback.bind(this), false);
},

createEntrySelectedEvent: function() {
var entrySelectedEvent;
if(typeof window.CustomEvent === 'function') {
entrySelectedEvent = new CustomEvent('entrySelected');
}
else {
// ie >= 9
entrySelectedEvent = document.createEvent('CustomEvent');
entrySelectedEvent.initCustomEvent('entrySelected', false, false, {});
}

return entrySelectedEvent;
},

close_popup_callback: function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ Y.extend(LTISERVICE, Y.Base, {
* @type {Object}
*/
init : function(params) {

debugger;

var documentElement = window.opener ? window.opener.parent.document : window.parent.document;
if (documentElement.getElementById('video_title')) {
Y.one(documentElement.getElementById('video_title')).setAttribute('value', params.title);
Expand Down Expand Up @@ -83,7 +86,7 @@ Y.extend(LTISERVICE, Y.Base, {
Y.one(documentElement.getElementById('closeltipanel')).simulate('click');
}

documentElement.body.dispatchEvent(documentElement.body.myEvent);
documentElement.body.dispatchEvent(documentElement.body.entrySelectedEvent);
}
},
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Y.extend(LTISERVICE, Y.Base, {
Y.one(documentElement.getElementById('closeltipanel')).simulate('click');
}

documentElement.body.dispatchEvent(documentElement.body.myEvent);
documentElement.body.dispatchEvent(documentElement.body.entrySelectedEvent);
}
},
{
Expand Down

0 comments on commit 049ed4e

Please sign in to comment.