This commit is contained in:
perploug
2013-09-04 16:00:30 +02:00
parent 0273b79935
commit 8e93cfa94d
202 changed files with 25170 additions and 332 deletions

View File

@@ -1,6 +1,19 @@
//TODO: WE NEED TO CONVERT ALL OF THESE METHODS TO PROXY TO OUR APPLICATION SINCE MANY CUSTOM APPS USE THIS!
//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($) {
@@ -130,13 +143,13 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
contentFrame: function (strLocation) {
if (!strLocation || strLocation == "") {
//SD: NOTE: We used to return the content iframe object but now I'm not sure we should do that ?!
if (typeof top.right != "undefined") {
return top.right;
}
else {
return top; //return the current window if the content frame doesn't exist in the current context
//SD: NOTE: We used to return the content iframe object but now I'm not sure we should do that ?!
if (typeof top.right != "undefined") {
return top.right;
}
else {
return top; //return the current window if the content frame doesn't exist in the current context
}
//return;
}
@@ -165,31 +178,31 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
//get our angular navigation service
var injector = getRootInjector();
var dialogService = injector.get("dialogService");
var dialogService = injector.get("dialogService");
var self = this;
//TODO: need to get the closeTriggers working for compatibility too somehow.
var dialog = dialogService.open({
var dialog = dialogService.open({
template: url,
width: width,
height: height,
iframe: true,
show: true,
callback: function (result) {
if (typeof onCloseCallback == "function") {
onCloseCallback.apply(self, [result]);
}
dialog.hide();
}
});
this._modal.push(dialog);
return dialog;
callback: function (result) {
if (typeof onCloseCallback == "function") {
onCloseCallback.apply(self, [result]);
}
dialog.hide();
}
});
this._modal.push(dialog);
return dialog;
},
closeModalWindow: function(rVal) {
@@ -199,11 +212,11 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
// all legacy calls to closeModalWindow are expecting to just close the last opened one so we'll ensure
// that this is still the case.
if (this._modal != null && this._modal.length > 0) {
dialogService.close(this._modal.pop(), { outVal: rVal });
}
else {
dialogService.closeAll(rVal);
if (this._modal != null && this._modal.length > 0) {
dialogService.close(this._modal.pop(), { outVal: rVal });
}
else {
dialogService.closeAll(rVal);
}
},
_debug: function(strMsg) {