forked from OPSI-srl/UManage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.ascx
94 lines (86 loc) · 5.07 KB
/
Main.ascx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<%@ Control CodeBehind="Main.ascx.cs" Inherits="OPSI.UManage.Pages.Main" %>
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %>
<!-- some help -->
<asp:Label ID="VAR_ModulePath" runat="server" ClientIDMode="Static" Style="display: none;"></asp:Label>
<asp:Label ID="VAR_ProfilePicBasePath" runat="server" ClientIDMode="Static" Style="display: none;"></asp:Label>
<asp:Label ID="VAR_FullEditPath" runat="server" ClientIDMode="Static" Style="display: none;"></asp:Label>
<asp:Label ID="VAR_IsAdmin" runat="server" ClientIDMode="Static" Style="display: none;">0</asp:Label>
<asp:Label ID="VAR_PageBase" runat="server" ClientIDMode="Static" Style="display: none;">0</asp:Label>
<asp:Label ID="VAR_CurrentLanguage" runat="server" ClientIDMode="Static" Style="display: none;">0</asp:Label>
<asp:Label ID="VAR_PortalID" runat="server" ClientIDMode="Static" Style="display: none;">0</asp:Label>
<!-- the app css -->
<dnn:DnnCssInclude ID="fum_module_css" runat="server" FilePath="~/DesktopModules/UManage/css/style.css" />
<dnn:DnnCssInclude ID="fum_icons_css" runat="server" FilePath="~/DesktopModules/UManage/app/bower_components/entypo/font/entypo.css" />
<!-- app libraries -->
<dnn:DnnJsInclude ID="fum_bower_angular" runat="server" FilePath="~/DesktopModules/UManage/app/bower_components/angular/angular.min.js" Priority="5" />
<!-- app ng-app-js -->
<dnn:DnnJsInclude ID="fum_app_controllers" runat="server" FilePath="~/DesktopModules/UManage/app/js/controllers/controller.js" Priority="7" />
<dnn:DnnJsInclude ID="fum_app_directives" runat="server" FilePath="~/DesktopModules/UManage/app/js/directives/directives.js" Priority="8" />
<dnn:DnnJsInclude ID="fum_app_services" runat="server" FilePath="~/DesktopModules/UManage/app/js/services/service.js" Priority="9" />
<dnn:DnnJsInclude ID="fum_app_launcher" runat="server" FilePath="~/DesktopModules/UManage/app/js/app.js" Priority="10" />
<!-- localization file -->
<dnn:DnnJsInclude ID="DnnJsInclude2" runat="server" FilePath="~/DesktopModules/UManage/app/localization/localization.js" Priority="4" />
<!-- the app view -->
<section data-ng-app="opsiModule" class="app">
<header class="app-header">
<h1 class="app-logo"><a>UManage <small>- User Manager</small></a></h1>
<nav class="app-menu opsi-main-menu">
<a class="closeme" href="<%=CloseModule_URL%>">Close UManage<span class="closeme__icon icon-cancel"></span></a>
<span style="display: none;">
<span class="icon-menu"></span>
<ul class="menu-main">
<li class="item"><a href="<%=CloseModule_URL%>">Go back</a>
</li>
</ul>
</span>
</nav>
</header>
<app-menu></app-menu>
<main class="app-section">
<opsi-user-tiles></opsi-user-tiles>
<opsi-user-detail></opsi-user-detail>
</main>
<footer class="app-footer">
Module developed with <span class="icon-heart" title="code"></span>by <strong><a href="http://www.opsi.it" target="_blank">OPSI </a></strong>©2015. Released under GNU/GPL licence.
</footer>
<opsi-dialog></opsi-dialog>
<opsi-dialog-modal></opsi-dialog-modal>
<app-error></app-error>
</section>
<!-- ng-app config -->
<script>
; (function () {
// getting a new serviceFramework instance for the angular app
var angular, app, serviceFramework;
angular = this.angular;
serviceFramework = $.ServicesFramework(<%=ModuleId %>);
angular.module('opsiModule')
// configuring http provider
.config(function ($httpProvider) {
return $httpProvider.defaults.headers.get = $httpProvider.defaults.headers.post = {
Accept: 'text/html',
'Content-Type': 'text/html; charset=UTF-8',
ModuleId: serviceFramework.getModuleId(),
RequestVerificationToken: serviceFramework.getAntiForgeryValue(),
TabId: serviceFramework.getTabId(),
'X-Requested-With': 'XMLHttpRequest'
};
})
// configuring fum provider
.config(function ($fumProvider) {
$fumProvider.setProperty('fullEditPath', '<%= VAR_FullEditPath.Text %>');
$fumProvider.setProperty('moduleApi', serviceFramework.getServiceRoot('UManage'));
$fumProvider.setProperty('moduleID', serviceFramework.getModuleId());
$fumProvider.setProperty('modulePath', '<%=VAR_ModulePath.Text %>');
$fumProvider.setProperty('profilePicPath', '<%=VAR_ProfilePicBasePath.Text %>');
$fumProvider.setProperty('sudo', '<%= VAR_IsAdmin.Text %>');
$fumProvider.setProperty('tabID', serviceFramework.getTabId());
$fumProvider.setProperty('currentLanguage', '<%=VAR_CurrentLanguage.Text %>');
$fumProvider.setProperty('portalID', '<%=VAR_PortalID.Text %>');
});
// bootstrapping the app
// setTimeout(function () {
// angular.bootstrap(document.querySelector('#opsi-fum-application'), ['opsiModule']);
// }, 10);
}).call(this);
</script>