handles parent.right.documet js references

This commit is contained in:
perploug
2013-10-10 19:43:15 +02:00
parent abf8aa7ea3
commit 36bc2473bf
2 changed files with 27 additions and 11 deletions

View File

@@ -4,21 +4,25 @@
//TEST to mock iframe, this intercepts calls directly
//to the old iframe, and funnels requests to angular directly
//var right = {document: {location: {}}};
/*Object.defineProperty(right.document.location, "href", {
get: function() {
return this._href ? this._href : "";
},
set: function(value) {
this._href = value;
UmbClientMgr.contentFrame(value);
},
});*/
/**/
Umbraco.Sys.registerNamespace("Umbraco.Application");
(function($) {
Umbraco.Application.ClientManager = function() {
//to support those trying to call right.document.etc
var fakeFrame = {};
Object.defineProperty(fakeFrame, "href", {
get: function() {
return this._href ? this._href : "";
},
set: function(value) {
this._href = value;
UmbClientMgr.contentFrame(value);
},
});
/**
* @ngdoc function
* @name getRootScope
@@ -175,6 +179,10 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
},
getFakeFrame : function() {
return fakeFrame;
},
/** This is used to launch an angular based modal window instead of the legacy window */
openAngularModalWindow: function (options) {