[% BLOCK APP_JS %]
<script src="[% ctx.media_prefix %]/js/ui/default/staff/services/ui.js"></script>
+<script src="[% ctx.media_prefix %]/js/ui/default/staff/services/eframe.js"></script>
<script src="[% ctx.media_prefix %]/js/ui/default/staff/admin/local/permission/app.js"></script>
<link rel="stylesheet" href="[% ctx.base_path %]/staff/css/admin.css" />
<script>
<div ng-view></div>
-[% END %]
\ No newline at end of file
+[% END %]
resolve : resolver
});
+ // catch admin/local/permission/grp_penalty_threshold
+ var eframe_template =
+ '<eg-embed-frame allow-escape="true" min-height="min_height" url="local_admin_url" handlers="funcs"></eg-embed-frame>';
+ $routeProvider.when('/admin/local/:schema/:page', {
+ template: eframe_template,
+ controller: 'EmbedConifyCtl',
+ resolve : resolver
+ });
+
$routeProvider.otherwise({redirectTo : '/admin/local/permission/grp_tree'});
})
egCore.startup.go(function() {
$scope.refreshTree(egCore.auth.user().ws_ou());
});
-}])
\ No newline at end of file
+}])
+
+.controller('EmbedConifyCtl',
+ ['$scope','$routeParams','$location','egCore',
+function($scope , $routeParams , $location , egCore) {
+
+ $scope.funcs = {
+ ses : egCore.auth.token(),
+ }
+
+ var conify_path = '/eg/conify/global/' +
+ $routeParams.schema + '/' + $routeParams.page;
+
+ $scope.min_height = 800;
+
+ // embed URL must include protocol/domain or it will be loaded via
+ // push-state, resulting in an infinitely nested pages.
+ $scope.local_admin_url =
+ $location.absUrl().replace(/\/eg\/staff.*/, conify_path);
+
+ console.log('Loading local admin URL: ' + $scope.local_admin_url);
+
+}])