harcoded create dialog hacks

This commit is contained in:
Per Ploug Krogslund
2013-07-10 13:57:13 +02:00
parent beef52e555
commit 8ff4d9c24c
2 changed files with 13 additions and 5 deletions

View File

@@ -235,12 +235,21 @@ angular.module('umbraco.services')
this.ui.dialogTitle = args.action.name;
var templateUrl = "views/" + this.ui.currentTree + "/" + args.action.alias + ".html";
var iframe = false;
///TODO: fix hardcoded hack, this is to support legacy create dialogs
if(args.action.alias === "create" && this.ui.currentTree !== "content" && this.ui.currentTree !== "media"){
templateUrl = "create.aspx?nodeId=" + args.node.id + "&nodeType=" + args.node.nodetype + "&nodeName=" + args.node.name + "&rnd=73.8&rndo=75.1";
iframe = true;
}
var d = dialogService.open(
{
container: $("#dialog div.umb-panel-body"),
scope: scope,
inline: true,
show: true,
iframe: iframe,
template: templateUrl
});
},

View File

@@ -9,8 +9,8 @@
* @description
* signs the user in
*/
var d = new Date();
var weekday = new Array("Super Sunday", "Manic Monday", "Tremendous Tuesday", "Wonderfull Wednesday", "Thunder Thursday", "Friendly Friday", "Shiny Saturday");
var d = new Date();
var weekday = new Array("Super Sunday", "Manic Monday", "Tremendous Tuesday", "Wonderfull Wednesday", "Thunder Thursday", "Friendly Friday", "Shiny Saturday");
$scope.today = weekday[d.getDay()];
$scope.loginClick = function (login, password) {
@@ -22,10 +22,9 @@
legacyJsLoader.loadLegacyTreeJs($scope).then(
function(result) {
//TODO: We could wait for this to load before running the UI ?
});
$scope.submit(data);
$scope.submit(data);
});
}, function (reason) {
alert(reason);
});