public override void Discover(ClientRouteTableBuilder builder) { builder.Describe("EntityDetail.Views") .Configure(descriptor => { descriptor.Url = "/Views"; }) .View(view => { view.TemplateUrl = "'" + ModuleBasePath + @"List'"; view.Controller = "ProjectionListCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/listcontroller" }); }); builder.Describe("ProjectionCreate") .Configure(descriptor => { descriptor.Url = "/Projections/{EntityName:[0-9a-zA-Z]+}/Create"; }) .View(view => { view.TemplateUrl = "function(params) { return '" + ModuleBasePath + @"Create/' + params.EntityName;}"; view.Controller = "ProjectionDetailCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/detailcontroller" }); }); builder.Describe("ProjectionEdit") .Configure(descriptor => { descriptor.Url = "/Projections/{EntityName:[0-9a-zA-Z]+}/{Id:[0-9a-zA-Z]+}"; }) .View(view => { view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + ModuleBasePath + @"Edit/' + $stateParams.Id; return $http.get(url).then(function(response) { return response.data; }); }]"; view.Controller = "ProjectionDetailCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/detailcontroller" }); }); }
public override void Discover(ClientRouteTableBuilder builder) { builder.Describe("FieldEdit") .Configure(descriptor => { descriptor.Abstract = true; }); builder.Describe("FieldEdit.Items") .View(view => { view.TemplateUrl = "'" + ModuleBasePath + @"List'"; view.Controller = "OptionItemsCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/optionitemeditcontroller", "services/optionitemdataservice" }); }); }
public override void Discover(ClientRouteTableBuilder builder) { builder.Describe("FormDesigner") .Configure(descriptor => { descriptor.Url = "/FormDesigner/{EntityName:[0-9a-zA-Z]+}"; }) .View(view => { view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + ModuleBasePath + @"Index/' + $stateParams.EntityName; return $http.get(url).then(function(response) { return response.data; }); }]"; view.Controller = "FormDesignerCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/formdesignercontroller" }); }); }
public override void Discover(ClientRouteTableBuilder builder) { builder.Describe("EntityList") .Configure(descriptor => { descriptor.Url = "/Entities"; }) .View(view => { view.TemplateUrl = "'" + ModuleBasePath + @"List'"; view.Controller = "EntityListCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, "controllers/listcontroller"); }); builder.Describe("EntityCreate") .Configure(descriptor => { descriptor.Url = "/Entities/Create"; }) .View(view => { view.TemplateUrl = "'" + ModuleBasePath + @"Create'"; view.Controller = "EntityEditCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, "controllers/editcontroller"); }); builder.Describe("EntityEdit") .Configure(descriptor => { descriptor.Url = "/Entities/{Id:[0-9a-zA-Z]+}/Edit"; }) .View(view => { view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + ModuleBasePath + @"Edit/' + $stateParams.Id; return $http.get(url).then(function(response) { return response.data; }); }]"; view.Controller = "EntityEditCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/editcontroller" }); }); builder.Describe("EntityDetail") .Configure(descriptor => { descriptor.Abstract = true; descriptor.Url = "/Entities/{Id:[0-9a-zA-Z]+}"; }) .View(view => { view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + ModuleBasePath + @"Detail/' + $stateParams.Id; return $http.get(url).then(function(response) { return response.data; }); }]"; view.Controller = "EntityDetailCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/detailcontroller" }); }); builder.Describe("EntityDetail.Fields") .View(view => { view.TemplateUrl = "'" + ModuleBasePath + @"Fields'"; view.Controller = "FieldsCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/fieldscontroller" }); }); #region Operate fields builder.Describe("EntityDetail.Fields.Create") .Configure(descriptor => { descriptor.Url = "/Create"; }) .View(view => { view.TemplateUrl = "function(params) { return '" + ModuleBasePath + @"CreateChooseType/' + params.Id; }"; view.Controller = "FieldCreateChooseTypeCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/createchoosetypecontroller" }); }); builder.Describe("EntityDetail.Fields.CreateEditInfo") .Configure(descriptor => { descriptor.Url = "/Create/{FieldTypeName:[0-9a-zA-Z]+}"; }) .View(view => { view.TemplateUrl = "function(params) { return '" + ModuleBasePath + @"CreateEditInfo/' + params.Id + '?FieldTypeName=' + params.FieldTypeName; }"; view.Controller = "FieldCreateEditInfoCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/createeditinfocontroller" }); }); builder.Describe("FieldEdit") .Configure(descriptor => { descriptor.Url = "/Fields/{EntityName:[0-9a-zA-Z]+}/Edit/{FieldName:[0-9a-zA-Z]+}"; }) .View(view => { view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + ModuleBasePath + @"EditFields/' + $stateParams.EntityName + '?FieldName=' + $stateParams.FieldName; return $http.get(url).then(function(response) { return response.data; }); }]"; view.Controller = "FieldEditCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/editfieldscontroller" }); }); builder.Describe("FieldDependencyList") .Configure(descriptor => { descriptor.Url = "/Fields/{EntityName:[0-9a-zA-Z]+}/Dependencies"; }) .View(view => { view.TemplateUrl = "function(params) { return '" + ModuleBasePath + @"DependencyList/' + params.EntityName; }"; view.Controller = "FieldDependencyListCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/dependencylistcontroller" }); }); builder.Describe("FieldDependencyCreate") .Configure(descriptor => { descriptor.Url = "/Fields/{EntityName:[0-9a-zA-Z]+}/Dependencies/Create"; }) .View(view => { view.TemplateUrl = "function(params) { return '" + ModuleBasePath + @"CreateDependency/' + params.EntityName; }"; view.Controller = "FieldDependencyCreateCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/dependencycreatecontroller" }); }); builder.Describe("FieldDependencyEdit") .Configure(descriptor => { descriptor.Url = "/Fields/{EntityName:[0-9a-zA-Z]+}/Dependencies/{DependencyID:[0-9]+}"; }) .View(view => { view.TemplateUrl = "function(params) { return '" + ModuleBasePath + @"EditDependency/' + params.EntityName + '?DependencyID=' + params.DependencyID; }"; view.Controller = "FieldDependencyEditCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new string[] { "controllers/dependencyeditcontroller" }); }); #endregion }
public override void Discover(ClientRouteTableBuilder builder) { var navigationView = new ClientViewDescriptor() { Name = "menulist", TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + ModuleBasePath + @"ViewTemplate/MenuList'; return $http.get(url).then(function (response) { return response.data; }); }]", Controller = "NavigationCtrl" }; navigationView.AddDependencies(ToAbsoluteScriptUrl, "controllers/navigationcontroller"); builder.Describe("Root") .Configure(descriptor => { descriptor.Url = "/"; descriptor.Views.Add(navigationView); }); builder.Describe("Navigation") .Configure(descriptor => { descriptor.Url = "/{NavigationId:[0-9]+}"; descriptor.Views.Add(navigationView); }); builder.Describe("List") .Configure(descriptor => { descriptor.Url = "/{NavigationId:[0-9]+}/{Module:[a-zA-Z]+}"; descriptor.Views.Add(navigationView); }) .View(view => { view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + BasePath + @"' + $stateParams.Module + '/ViewTemplate/List/' + $stateParams.Module; return $http.get(url).then(function (response) { return response.data; }); }]"; view.Controller = "GeneralListCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/listcontroller" }); }); builder.Describe("Create") .Configure(descriptor => { descriptor.Url = "/{NavigationId:[0-9]+}/{Module:[a-zA-Z]+}/Create"; descriptor.Views.Add(navigationView); }) .View(view => { view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + BasePath + @"' + $stateParams.Module + '/ViewTemplate/Create/' + $stateParams.Module; return $http.get(url).then(function (response) { return response.data; }); }]"; view.Controller = "GeneralDetailCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/detailcontroller" }); }); builder.Describe("Detail") .Configure(descriptor => { descriptor.Url = "/{NavigationId:[0-9]+}/{Module:[a-zA-Z]+}/{Id:[0-9a-zA-Z]+}"; descriptor.Views.Add(navigationView); }) .View(view => { view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + BasePath + @"'+ $stateParams.Module + '/ViewTemplate/Edit/' + $stateParams.Id; return $http.get(url).then(function (response) { return response.data; }); }]"; view.Controller = "GeneralDetailCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/detailcontroller" }); }); builder.Describe("View") .Configure(descriptor => { descriptor.Url = "/{NavigationId:[0-9]+}/{Module:[a-zA-Z]+}/View/{Id:[0-9a-zA-Z]+}"; descriptor.Views.Add(navigationView); }) .View(view => { view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + BasePath + @"' + $stateParams.Module + '/ViewTemplate/View/' + $stateParams.Id; return $http.get(url).then(function (response) { return response.data; }); }]"; view.Controller = "GeneralViewCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, "controllers/viewcontroller"); }); }
public override void Discover(ClientRouteTableBuilder builder) { builder.Describe("View") .View(view => view.AddDependencies(ToAbsoluteScriptUrl, "controllers/relatedentitylistcontroller")); }
public override void Discover(ClientRouteTableBuilder builder) { builder.Describe("EntityDetail.Relationships") .Configure(descriptor => { descriptor.Url = "/Relationships"; }) .View(view => { view.TemplateUrl = "'" + ModuleBasePath + @"Relationships'"; view.Controller = "RelationshipsCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/relationshipscontroller" }); }); builder.Describe("CreateOneToMany") .Configure(descriptor => { descriptor.Url = "/Relationships/{EntityName:[0-9a-zA-Z]+}/CreateOneToMany"; }) .View(view => { view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + ModuleBasePath + @"CreateOneToMany/' + $stateParams.EntityName; return $http.get(url).then(function(response) { return response.data; }); }]"; view.Controller = "CreateOneToManyCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new [] { "controllers/onetomanydetailcontroller" }); }); builder.Describe("EditOneToMany") .Configure(descriptor => { descriptor.Url = "/Relationships/{EntityName:[0-9a-zA-Z]+}/EditOneToMany/{RelationId:[0-9]+}"; }) .View(view => { view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + ModuleBasePath + @"EditOneToMany/' + $stateParams.EntityName+ '?RelationId=' + $stateParams.RelationId; return $http.get(url).then(function(response) { return response.data; }); }]"; view.Controller = "EditOneToManyCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new string[] { "controllers/editonetomanycontroller" }); }); builder.Describe("CreateManyToMany") .Configure(descriptor => { descriptor.Url = "/Relationships/{EntityName:[0-9a-zA-Z]+}/CreateManyToMany"; }) .View(view => { view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + ModuleBasePath + @"CreateManyToMany/' + $stateParams.EntityName; return $http.get(url).then(function(response) { return response.data; }); }]"; view.Controller = "CreateManyToManyCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new [] { "controllers/manytomanydetailcontroller" }); }); builder.Describe("EditManyToMany") .Configure(descriptor => { descriptor.Url = "/Relationships/{EntityName:[0-9a-zA-Z]+}/EditManyToMany/{RelationId:[0-9]+}"; }) .View(view => { view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + ModuleBasePath + @"EditManyToMany/' + $stateParams.EntityName+ '?RelationId=' + $stateParams.RelationId; return $http.get(url).then(function(response) { return response.data; }); }]"; view.Controller = "EditManyToManyCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new [] { "controllers/editmanytomanycontroller" }); }); builder.Describe("View") .View(view => view.AddDependencies(ToAbsoluteScriptUrl, "controllers/relatedentitylistcontroller")); }
public override void Discover(ClientRouteTableBuilder builder) { builder.Describe("PerspectiveList") .Configure(descriptor => { descriptor.Url = "/Perspectives"; }) .View(view => { view.TemplateUrl = "'" + ModuleBasePath + @"List'"; view.Controller = "PerspectiveListCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new string[] { "controllers/listcontroller" }); }); builder.Describe("PerspectiveCreate") .Configure(descriptor => { descriptor.Url = "/Perspectives/Create"; }) .View(view => { view.TemplateUrl = "'" + ModuleBasePath + @"Create'"; view.Controller = "PerspectiveEditCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new string[] { "controllers/editcontroller" }); }); builder.Describe("PerspectiveEdit") .Configure(descriptor => { descriptor.Url = "/Perspectives/{Id:[0-9a-zA-Z]+}/Edit"; }) .View(view => { view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + ModuleBasePath + @"Edit/' + $stateParams.Id; return $http.get(url).then(function(response) { return response.data; }); }]"; view.Controller = "PerspectiveEditCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new string[] { "controllers/editcontroller" }); }); builder.Describe("PerspectiveDetail") .Configure(descriptor => { descriptor.Url = "/Perspectives/{Id:[0-9a-zA-Z]+}"; }) .View(view => { view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + ModuleBasePath + @"Detail/' + $stateParams.Id; return $http.get(url).then(function(response) { return response.data; }); }]"; view.Controller = "PerspectiveDetailCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new string[] { "controllers/detailcontroller" }); }); builder.Describe("CreateNavigationItem") .Configure(descriptor => { descriptor.Url = "/Perspectives/{Id:[0-9a-zA-Z]+}/Navigation/Create"; }) .View(view => { view.TemplateUrl = "function(params) { return '" + ModuleBasePath + @"CreateNavigationItem/' + params.Id;}"; view.Controller = "NavigationItemEditCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new string[] { "controllers/navigationitemeditcontroller" }); }); builder.Describe("EditNavigationItem") .Configure(descriptor => { descriptor.Url = "/Perspectives/{Id:[0-9a-zA-Z]+}/Navigation/{NId:[0-9a-zA-Z]+}"; }) .View(view => { view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) { var url = '" + ModuleBasePath + @"EditNavigationItem/' + $stateParams.NId; return $http.get(url).then(function(response) { return response.data; }); }]"; view.Controller = "NavigationItemEditCtrl"; view.AddDependencies(ToAbsoluteScriptUrl, new string[] { "controllers/navigationitemeditcontroller" }); }); }