iconClass: 'vsphere-icon-toolbar-remove',\n tooltipText: i18nService.getString('CommonModuleUi', 'categoryAction.remove.desc'),\n enabled: false,\n onClick: deleteCategory\n };\n\n self.datagridOptions = {\n actionBarOptions: {\n actions: [\n addAction,\n editAction,\n deleteAction\n ]\n },\n columnDefs: [\n {\n displayName: i18nService.getString('Common', 'tag.dashboard.categories.name'),\n field: 'categoryName',\n sortable: true,\n searchable: false,\n template: function(dataItem) {\n return dataGridTemplate(dataItem,'categoryName');\n }\n },\n {\n displayName: i18nService.getString('Common', 'tag.dashboard.categories.desc'),\n field: 'categoryDescription',\n sortable: true,\n searchable: false,\n template: function(dataItem) {\n return dataGridTemplate(dataItem,'categoryDescription');\n }\n },\n {\n displayName: i18nService.getString('Common', 'tag.dashboard.categories.cardinality'),\n field: 'multipleCardinality',\n sortable: true,\n searchable: false,\n template: function(dataItem) {\n return dataGridTemplate(dataItem,'multipleCardinality');\n }\n },\n {\n displayName: i18nService.getString('Common', 'tag.dashboard.categories.associable'),\n field: 'displayAssociableEntityTypesString',\n sortable: true,\n searchable: false,\n template: function(dataItem) {\n return dataGridTemplate(dataItem,'displayAssociableEntityTypesString');\n }\n }\n ],\n sortOrder: [{\n field: 'categoryName',\n dir: 'asc'\n }],\n height: '100%',\n resizable: true,\n selectionMode: vuiConstants.grid.selectionMode.SINGLE,\n selectedItems: [],\n data: []\n };\n\n function transform (categories) {\n return _.map(categories, function(category) {\n if (category.associableEntityTypes.length === 0) {\n category.displayAssociableEntityTypesString = i18nService.getString('Common', 'tag.dashboard.categories.associable.all');\n } else {\n category.displayAssociableEntityTypesString = lookupEntityNames(category.associableEntityTypes).join(', ');\n }\n return category;\n });\n }\n\n function lookupEntityNames (entityTypes) {\n return _.map(entityTypes, function(entityType) {\n return i18nService.getString('Common', 'typeResource.entityType.' + entityType + 'Plural');\n });\n }\n\n function refreshCategories () {\n categoryService.getAll().then(function(data) {\n self.datagridOptions.data = transform(data);\n });\n }\n\n /**\n * Generate html template for datagrid\n */\n function dataGridTemplate (dataItem, fieldName) {\n var ele = document.createElement(\"span\");\n ele.setAttribute(\"ng-non-bindable\", \"ng-non-bindable\");\n ele.title = dataItem[fieldName];\n ele.textContent = dataItem[fieldName];\n return ele.outerHTML;\n }\n\n $scope.$watch('ctrl.datagridOptions.selectedItems', function (selectedItems) {\n var selected = selectedItems.length > 0;\n deleteAction.enabled = selected;\n editAction.enabled = selected;\n });\n\n $scope.$on('refreshCategories', function(){\n refreshCategories();\n });\n\n refreshCategories();\n }\n})();\n","(function () {\n /**\n * A node of the messages inside the compatibility box.\n *\n */\n 'use strict';\n angular.module('com.vmware.vsphere.client.commonModule').directive('vxCompatibilityMessageNode', [\n '$compile',\n function vxCompatibilityMessageNode($compile) {\n return {\n restrict: 'A',\n templateUrl: 'common-module-ui/resources/common-module/views/compatibility/vxCompatibilityMessageNode.html',\n scope: {\n content: '='\n },\n link: function ($scope, element) {\n if (!_.isEmpty($scope.content.contents)) {\n var innerElement = $compile('
  • ')($scope);\n element.find('ul').append(innerElement);\n }\n }\n };\n }]);\n})();\n","/* Copyright 2015 VMware, Inc. All rights reserved. -- VMware Confidential */\n(function() {\n 'use strict';\n angular.module('com.vmware.vsphere.client.commonModule').directive('vxCompatibilityView', VxCompatibilityView);\n\n VxCompatibilityView.$inject = [\n 'clarityModalService',\n 'i18nService',\n '$injector',\n '$q'\n ];\n\n /**\n * A compatibility box that holds the results from the compatibility check in wizards (i.e migrate, create VM...).\n *\n * onShowDetailsClick - A callback that can accept the contents as a parameter.\n * If it returns a promise, the compatibility box will wait for the promise to be\n * resolved and then it will display the dialog.\n * If the callback is not of type 'function', it will be ignored.\n * summarize - if 'true', the messages are summarized and 'Show details..' link is displayed\n * It is 'true' by default.\n */\n function VxCompatibilityView(clarityModalService, i18nService, $injector, $q) {\n return {\n restrict: 'E',\n replace: true,\n templateUrl: 'common-module-ui/resources/common-module/views/compatibility/vxCompatibilityView.html',\n scope: {\n compatibilityTitle: '<',\n contents: '<',\n summarize: '

    本社风貌 | 联系我们 | 友情链接 | 法律声明 | 诚聘英才
    电子邮箱:tax@ctax.org.cn | 联系电话:010-63422191 | 传真:86-010-63584617
    中国税务网编辑部投稿邮箱:shuixun@ctax.org.cn | 中国税务网编辑部电话:010-63886789
    《中国税务》投稿邮箱:zsbjb@ctax.org.cn |《税务研究》投稿邮箱:swyj@ctax.org.cn |《国际税收》投稿邮箱:gjss@ctax.org.cn
    地址:北京市丰台区广安路9号国投财富广场1号楼10层 邮政编码:100055
    主办:中国税务杂志社 HTTP://www.ctax.org.cn

    版权所有 未经许可不得复制或建立镜像

    互联网新闻信息服务许可证 国新网 1012012003 | 电信与信息服务业务经营许可证:京ICP证040820号 | 备案:京公网安备 11010602130045号