From 8ff4d9c24cb40721e7b0932ecffc23ed1cb2e88a Mon Sep 17 00:00:00 2001 From: Per Ploug Krogslund Date: Wed, 10 Jul 2013 13:57:13 +0200 Subject: [PATCH] harcoded create dialog hacks --- .../src/common/services/navigation.service.js | 9 +++++++++ .../src/views/common/dialogs/login.controller.js | 9 ++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js b/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js index 7c013da881..a1c368deb9 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js @@ -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 }); }, diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.controller.js index 5dc4f51628..cc50c0acf6 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.controller.js @@ -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); });