本文整理汇总了TypeScript中entcore.template.open方法的典型用法代码示例。如果您正苦于以下问题:TypeScript template.open方法的具体用法?TypeScript template.open怎么用?TypeScript template.open使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类entcore.template
的用法示例。
在下文中一共展示了template.open方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
writeMail: async function (params) {
Conversation.instance.folders.openFolder('inbox');
await Conversation.instance.sync();
template.open('page', 'folders');
template.open('main', 'mail-actions/write-mail');
$scope.constructNewItem();
if (_.isString(params.id)) {
if (!params.type || params.type === 'User') {
let user = new User(params.id);
await user.findData();
$scope.addUser(user);
}
else if (params.type === 'Group') {
let group = new User(params.id);
await group.findGroupData();
$scope.addUser(group);
}
else if (params.type === 'Favorite') {
await $scope.state.newItem.addFavorite(params.id);
}
} else if (params.id !== undefined) {
for (let i = 0; i < params.id.length; i++) {
let user = new User(params.id[i]);
await user.findData();
$scope.addUser(user);
}
}
$scope.$apply();
},
示例2: function
dashboardTeacherLibrary: function () {
if (_userProfile === teacherProfile) {
template.open('main', 'teacher-dashboard-library-tab');
} else {
template.open('main', '401-exercizer');
}
},
示例3: function
directory: async function(){
$scope.classView = false;
$scope.display.loading = false;
$scope.display.loadingmobile = false;
$scope.display.showCloseMobile = false;
$scope.classrooms = [];
$scope.currentSchool = undefined;
directory.directory.users.all = [];
directory.directory.groups.all = [];
directory.favoriteForm.users.all = [];
directory.network.schools.all = [];
$scope.users = directory.directory.users;
$scope.allUsers = Object.assign([], $scope.users);
$scope.groups = directory.directory.groups;
await $scope.createAllFavorites();
$scope.favoriteFormUsersGroups = [];
if (!ui.breakpoints.checkMaxWidth("wideScreen")) {
await $scope.selectFirstFavorite();
}
$scope.display.searchmobile = false;
$scope.schools = directory.network.schools;
await $scope.schools.sync();
// Filters for search
$scope.criteria = await directory.directory.users.getSearchCriteria();
$scope.filters = {
users: {
structures: [],
classes: [],
profiles: [],
functions: []
},
groups: {
structures: [],
classes: [],
profiles: [],
functions: [],
types: []
}
};
$scope.filtersOptions = {
users: $scope.generateCriteriaOptions($scope.filters.users),
groups: $scope.generateCriteriaOptions($scope.filters.groups)
};
$scope.create.favorite.options = $scope.generateCriteriaOptions($scope.create.favorite.filters);
$scope.classesOrder = ['structId', 'label'];
template.open('page', 'directory');
template.close('list');
template.open('list', 'dominos');
$scope.title = 'directory';
$scope.$apply();
},