UNPKG

webgme

Version:

Web-based Generic Modeling Environment

19 lines 63.2 kB
angular.module("isis.ui.demoApp.templates", []).run(["$templateCache", function($templateCache) {$templateCache.put("/docs/ui_components_docs.html","<!DOCTYPE html>\n<html ng-app=\"isis.ui.demoApp\">\n<head>\n <title>ISIS UI Components Documentation</title>\n\n <link type=\"text/css\" rel=\"stylesheet\" href=\"//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css\">\n <link type=\"text/css\" rel=\"stylesheet\" href=\"https://code.jquery.com/ui/1.11.1/themes/black-tie/jquery-ui.css\">\n <link type=\"text/css\" href=\"//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css\" rel=\"stylesheet\">\n\n <link type=\"text/css\" rel=\"stylesheet\" href=\"isis-ui-components-docs.css\">\n <link type=\"text/css\" rel=\"stylesheet\" href=\"../isis-ui-components.css\">\n\n</head>\n<body ng-cloak>\n<div ng-controller=\"UIComponentsDemoController\" class=\"container\">\n\n <h1>isis.ui.components</h1>\n\n <section ng-repeat=\"component in components\" id=\"{{ component.name }}\">\n <div class=\"page-header\">\n <h1>{{ component.name }}\n <small>(isis.ui.{{ component.name }})</small>\n </h1>\n </div>\n\n <div class=\"row\">\n <div class=\"col-md-6 show-grid\" ng-include=\"component.template\">\n\n </div>\n <div btf-markdown class=\"col-md-6\" ng-include=\"component.docs\">\n </div>\n </div>\n <div class=\"row\"\n ng-if=\"component.sources\">\n\n <ul class=\"nav nav-tabs\">\n <li ng-repeat=\"sourceFile in component.sources\"\n ng-click=\"component.selectedSourceFile = component.sources[$index]\">\n <a href=\"#\">{{sourceFile.fileName}}</a>\n </li>\n </ul>\n <!-- Tab panes -->\n <div class=\"tab-content\">\n <div role=\"tabpanel\"\n class=\"tab-pane active\">\n <div ui-codemirror\n ui-codemirror-opts=\"component.selectedSourceFile.viewerOptions\"\n ng-model=\"component.selectedSourceFile.code\"\n ui-refresh=\"component.selectedSourceFile\">\n </div>\n </div>\n </div>\n </div>\n\n </section>\n\n</div>\n<script src=\"https://code.jquery.com/jquery-2.1.1.min.js\"></script>\n<script src=\"https://code.jquery.com/ui/1.11.1/jquery-ui.min.js\"></script>\n<script src=\"../../bower_components/angular/angular.min.js\"></script>\n<script src=\"//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js\"></script>\n\n<script src=\"../isis-ui-components.js\"></script>\n<script src=\"../isis-ui-components-templates.js\"></script>\n\n<script src=\"isis-ui-components-docs.js\"></script>\n<script src=\"isis-ui-components-doc-templates.js\"></script>\n\n</body>\n</html>"); $templateCache.put("/library/contextmenu/docs/demo.html","<script type=\"text/ng-template\" id=\"contextmenu-custom-content.html\">\n <div class=\"custom-content\" style=\"border:1px solid rgba(0,0,0,.15); padding: 1ex; background-color: #fff;\" ng-controller=\"ContextmenuCustomTemplateController\">\n <div>\n <button class=\"btn btn-default btn-sm pull-right\" ng-click=\"closeClick()\">Close this <i class=\"glyphicon glyphicon-remove-sign\"></i></button>\n </div>\n <div class=\"clearfix\"></div>\n <div>\n <p>That you now the result of this equation?</p>\n <label>2 + 2 = </label><input ng-model=\"parameter.value\" min=\"0\" max=\"99\" required ng-change=\"isValid(parameter.value)\"/>\n <span ng-if=\"parameter.invalid\" class=\"label label-danger\">This can not be true!</span>\n </div>\n </div>\n</script>\n\n<div data-ng-controller=\"ContextmenuDemoController\">\n <p>Test context-menus here:</p>\n <button class=\"btn btn-default\"\n contextmenu=\"preContextMenu($event)\"\n isis-contextmenu\n contextmenu-data=\"menuData\">\n Contextmenu default (right-click)</button>\n <p></p>\n <button class=\"btn btn-default\"\n contextmenu=\"preContextMenu($event)\"\n isis-contextmenu\n contextmenu-data=\"menuData\"\n contextmenu-config=\"menuConfig1\">\n Contextmenu on click, positioned to left-right</button>\n <p></p>\n <button class=\"btn btn-default\"\n contextmenu=\"preContextMenu($event)\"\n isis-contextmenu\n contextmenu-config=\"menuConfig2\">\n Custom content, appears on mouseover, positioned to left-right</button>\n</div>"); $templateCache.put("/library/dropdownNavigator/docs/demo.html","<div style=\"height: 220px;\" data-ng-controller=\"DropdownDemoController\">\n <div style=\"background-color: #222;\">\n <dropdown-navigator data-navigator=\"navigator\"></dropdown-navigator>\n </div>\n</div>"); $templateCache.put("/library/hierarchicalMenu/docs/demo.html","<div style=\"height: 200px;\">\n <div data-ng-controller=\"HierarchicalMenuDemoController\">\n <hierarchical-menu menu=\"menu\"></hierarchical-menu>\n </div>\n <div class=\"clearfix\"></div>\n</div>"); $templateCache.put("/library/itemList/docs/demo.html","<script type=\"text/ng-template\" id=\"list-item-details.html\">\n <div ng-controller=\"ListItemDetailsDemoController\"\n class=\"custom-content\" style=\"border:1px solid rgba(0,0,0,.15); padding: 1ex; background-color: #fff;\">\n <div class=\"clearfix\"></div>\n <div>\n <p>That you now the result of this equation?</p>\n <label>2 + 2 = </label><input ng-model=\"parameter.value\" min=\"0\" max=\"99\" required\n ng-change=\"isValid(parameter.value)\"/>\n <span ng-if=\"parameter.invalid\" class=\"label label-danger\">This can not be true!</span>\n </div>\n </div>\n More stuff can come here. As you wish. As you like it.\n</script>\n\n<script type=\"text/ng-template\" id=\"list-item-details2.html\">\n <div ng-controller=\"ListItemDetailsDemoController2\">\n <demo-sub-list\n list-data=\"listData2\" config=\"config2\"></demo-sub-list>\n </div>\n</script>\n\n<div data-ng-controller=\"ItemListDemoController\" style=\"height: 700px; overflow-x:auto; padding: 0 1ex;\">\n <item-list list-data=\"listData\" config=\"config\" class=\"col-md-12\"></item-list>\n</div>"); $templateCache.put("/library/itemList/docs/headerTemplate.html","<h4><a class=\"item-title\"\n ng-click=\"itemClick($event, item)\"\n tooltip=\"{{ item.toolTip }}\"\n tooltip-placement=\"right\">{{ item.title }} - this is custom-made header</a></h4>\n"); $templateCache.put("/library/itemList/docs/newItemTemplate.html","<form class=\"drop-box new-order-set\">\n <div class=\"row\">\n <div class=\"col-md-3\">\n <input type=\"text\" class=\"form-control\" data-ng-model=\"newItem.id\"\n placeholder=\"ID\">\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <input type=\"text\" class=\"form-control\" data-ng-model=\"newItem.title\"\n placeholder=\"New item name\">\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12\">\n <textarea class=\"form-control edit-workspace-description\" rows=\"5\"\n data-ng-model=\"newItem.description\"\n placeholder=\"Description\"></textarea>\n </div>\n </div>\n <div class=\"row form-footer\">\n <div class=\"col-md-8\">\n <button class=\"btn btn-default btn-submit btn-success\"\n data-ng-click=\"createItem(newItem)\">Create\n </button>\n </div>\n </div>\n</form>\n"); $templateCache.put("/library/propertyGrid/docs/property_grid_demo.html","<!DOCTYPE html>\n<html>\n<head lang=\"en\">\n<meta charset=\"UTF-8\">\n<title></title>\n\n<script src=\"http://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.14/require.min.js\"></script>\n\n<!--<script src=\"//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.20/angular.min.js\"></script>-->\n\n<script type=\"text/javascript\">\nvar DEBUG = true,\n _jqueryVersion = \'2.1.0\',\n _jqueryUIVersion = \'1.10.4\',\n _bootsrapVersion = \'3.1.1\';\n\n\nrequire.config( {\n baseUrl: \"../../../\",\n\n map: {\n \'*\': {\n \'css\': \'lib/require/require-css/css\',\n \'text\': \'lib/require/require-text/text\'\n }\n },\n\n paths: {\n \'jquery\': \'lib/jquery/jquery-\' + _jqueryVersion + ( DEBUG ? \'.min\' : \'\' ),\n \'bootstrap\': \'lib/bootstrap/\' + _bootsrapVersion + \'/js/bootstrap\' + ( DEBUG ? \'.min\' : \'\' ),\n\n \'angular\': \'lib/angular/angular-1.2.19/angular\' + ( DEBUG ? \'.min\' : \'\' ),\n \'angular-ui-bootstrap\': \'lib/angular/ui-bootstrap/ui-bootstrap-tpls-0.11.0.min\'\n },\n\n shim: {\n \'angular-ui-bootstrap\': [\'angular\', \'bootstrap\'],\n\n \'bootstrap\': [\n \'jquery\',\n \'css!lib/bootstrap/\' + _bootsrapVersion + \'/css/bootstrap.min.css\',\n \'css!lib/bootstrap/\' + _bootsrapVersion + \'/css/bootstrap-theme.min.css\'\n ]\n },\n\n waitSeconds: 15\n} );\n\nrequirejs( [\n \'angular-ui-bootstrap\',\n \'isis-ui-components/propertyGrid/propertyGrid\'], function ( ngBootstrap, PropertyGrid ) {\n\n var demoApp = angular.module( \'demoApp\', [\'ui.bootstrap\', \'isis.ui.propertyGrid\'] );\n\n demoApp.controller( \'PropertyGridDemoController\', function ( $scope ) {\n var onChange = function ( item ) {\n\n console.log( \'Item changed > \' + item.label, item );\n\n },\n\n attributes = [\n {\n id: \'Name\',\n label: \'Name\',\n values: [\n {\n value: \'This is my name\'\n }\n ],\n onChange: onChange\n },\n {\n\n id: \'compound\',\n label: \'Compound something\',\n cssClass: \'\',\n values: [\n {\n value: [\n {\n id: \'Position_x\',\n label: \'X\',\n values:[\n {\n value: 10\n }\n ]\n //valueWidget: integerValueWidget,\n },\n {\n id: \'Position_y\',\n label: \'Y\',\n values: [\n {\n value: 30\n }\n ]\n //valueWidget: integerValueWidget,\n },\n {\n id: \'Dabrack\',\n label: \'Dabrack\',\n values: [\n {\n value: \'This is my name\'\n }\n ],\n onChange: onChange\n }\n ],\n getDisplayValue: function ( value ) {\n var coordinates = value.value;\n\n return coordinates[0].values[0].value + \', \' + coordinates[1].values[0].value;\n },\n widget: {\n type: \'compound\'\n }\n }\n ],\n onChange: onChange\n },\n {\n id: \'is_happy\',\n label: \'Happy or not?\',\n values: [\n { value: true }\n ]\n },\n {\n id: \'is_rich\',\n label: \'Rich or not?\',\n values: [\n { value: false }\n ]\n },\n {\n id: \'country\',\n label: \'Country\',\n values: [\n {\n value: \'U.S.A.\',\n widget: {\n type: \'select\',\n defaultValue: \'pol\',\n config: {\n multi: false,\n options: [\n {\n label: \'U.S.A.\',\n value: \'usa\'\n },\n {\n label: \'Poland\',\n value: \'pol\'\n },\n {\n label: \'England\',\n value: \'eng\'\n }\n ]\n }\n }\n\n }\n ],\n onChange: onChange\n }\n ],\n visualizationProperties = [\n {\n id: \'color\',\n label: \'Color\',\n values: [\n {\n value: \'#ff0066\',\n widget: {\n type: \'colorPicker\'\n }\n }\n ],\n onChange: onChange\n },\n\n {\n\n id: \'Position\',\n label: \'Position\',\n cssClass: \'\',\n values: [\n\n {\n id: \'Position_x\',\n label: \'X\',\n value: 10\n //valueWidget: integerValueWidget,\n },\n {\n id: \'Position_y\',\n label: \'Y\',\n value: 30\n //valueWidget: integerValueWidget,\n }\n ],\n onChange: onChange\n }\n\n ],\n config = {\n propertyLabelPostfix: \':\',\n mode: \'display\'\n },\n propertyGroup1 = {\n label: \'Attributes\',\n expanded: true,\n items: attributes\n },\n propertyGroup2 = {\n label: \'Visualization properties\',\n expanded: true,\n items: visualizationProperties\n },\n propertyGroups = [ propertyGroup1, propertyGroup2 ];\n\n $scope.grid = {\n propertyGroups: propertyGroups,\n config: config,\n id: \'propertyGrid1\'\n };\n\n } );\n\n angular.bootstrap( document, [\'demoApp\'] );\n\n console.log( \'Demo controller initialized\' );\n} );\n\n</script>\n\n<style>\n .property-panel {\n width: 300px;\n font-size: 11px;\n }\n\n</style>\n\n</head>\n<body>\n\n<div data-ng-controller=\"PropertyGridDemoController\" style=\"padding: 10px\">\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-md-1\">Mode:</div>\n <div class=\"col-md-4\">\n <div class=\"btn-group\">\n <label class=\"btn btn-default\" ng-model=\"grid.config.mode\" btn-radio=\"\'display\'\">Display</label>\n <label class=\"btn btn-default\" ng-model=\"grid.config.mode\" btn-radio=\"\'edit\'\">Edit</label>\n </div>\n </div>\n </div>\n </div>\n\n <p></p>\n\n <div class=\"property-panel\">\n <property-grid grid-data=\"grid\" unresponsive=\"true\"></property-grid>\n </div>\n\n <div class=\"container-fluid\">\n <property-grid grid-data=\"grid\"></property-grid>\n </div>\n`\n</div>\n\n</body>\n</html>"); $templateCache.put("/library/searchBox/docs/demo.html","<div data-ng-controller=\"SearchBoxDemoController\" style=\"height: 100px; overflow-x:auto; padding: 0 1ex;\">\n <search-box></search-box>\n</div>"); $templateCache.put("/library/simpleDialog/docs/demo.html","<script type=\"text/ng-template\" id=\"confirm-content-template\">\n <p>That you now the result of this equation?</p>\n <label>2 + 2 = </label><input ng-model=\"parameter.value\" min=\"0\" max=\"99\" required ng-change=\"isValid()\"/>\n <span ng-if=\"parameter.invalid\" class=\"label label-danger\">This can not be true!</span>\n</script>\n\n<div data-ng-controller=\"ConfirmDialogDemoController\">\n Test a dialog here: <button class=\"btn btn-default\" ng-click=\"openDialog()\">Open dialog</button>\n</div>"); $templateCache.put("/library/treeNavigator/docs/demo.html","<div data-ng-controller=\"TreeNavigatorDemoController\" style=\"height: 600px; overflow-x:auto;\">\n <tree-navigator tree-data=\"treeData\" config=\"config\"></tree-navigator>\n</div>"); $templateCache.put("/docs/docs_app.js","/*globals angular, require*/\n\'use strict\';\n\nvar components = [\n {\n name: \'itemList\',\n sources: [ \'demo.html\', \'newItemTemplate.html\', \'demo.js\']\n },\n {\n name: \'hierarchicalMenu\',\n sources: [ \'demo.html\', \'demo.js\']\n },\n {\n name: \'contextmenu\',\n sources: [ \'demo.html\', \'demo.js\']\n },\n {\n name: \'dropdownNavigator\',\n sources: [ \'demo.html\', \'demo.js\']\n },\n {\n name: \'treeNavigator\',\n sources: [\'demo.html\', \'demo.js\']\n }\n];\n\nrequire(\'../library/hierarchicalMenu/docs/demo.js\');\nrequire(\'../library/contextmenu/docs/demo.js\');\nrequire(\'../library/dropdownNavigator/docs/demo.js\');\nrequire(\'../library/treeNavigator/docs/demo.js\');\nrequire(\'../library/itemList/docs/demo.js\');\n\nrequire(\'angular-sanitize\');\nwindow.Showdown = require(\'showdown\');\nrequire(\'angular-markdown-directive\');\n\nrequire(\'codemirror-css\');\nwindow.CodeMirror = require(\'codemirror\');\n\nrequire(\'codemirror/mode/htmlmixed/htmlmixed\');\nrequire(\'codemirror/mode/xml/xml\');\nrequire(\'codemirror/mode/javascript/javascript\');\n\nrequire(\'angular-ui-codemirror\');\n\n\nvar demoApp = angular.module(\n \'isis.ui.demoApp\', [\n \'isis.ui.demoApp.templates\',\n \'btford.markdown\',\n \'ui.codemirror\'\n ].concat(components.map(function (e) {\n return \'isis.ui.\' + e.name + \'.demo\';\n }))\n);\n\ndemoApp.run(function () {\n console.log(\'DemoApp run...\');\n});\n\ndemoApp.controller(\n \'UIComponentsDemoController\',\n function ($scope, $templateCache) {\n\n var fileExtensionRE,\n codeMirrorModes;\n\n fileExtensionRE = /(?:\\.([^.]+))?$/;\n\n codeMirrorModes = {\n \'js\': \'javascript\',\n \'html\': \'htmlmixed\'\n };\n\n $scope.components = components.map(function (component) {\n var sources,\n viewerOptions,\n fileExtension;\n\n if (angular.isArray(component.sources)) {\n sources = component.sources.map(function (sourceFile) {\n\n fileExtension = fileExtensionRE.exec(sourceFile);\n\n viewerOptions = {\n lineWrapping: true,\n lineNumbers: true,\n readOnly: true,\n mode: codeMirrorModes[fileExtension[1]] || \'xml\'\n };\n\n return {\n fileName: sourceFile,\n code: $templateCache.get(\'/library/\' + component.name + \'/docs/\' +\n sourceFile),\n viewerOptions: viewerOptions\n };\n });\n }\n\n return {\n name: component.name,\n template: \'/library/\' + component.name + \'/docs/demo.html\',\n docs: \'/library/\' + component.name + \'/docs/readme.md\',\n sources: sources,\n selectedSourceFile: sources[0]\n };\n });\n\n });\n\nwindow.countOfSesquatches = function (printWatchers) {\n\n var root = angular.element(document.getElementsByTagName(\'body\'));\n\n var watchers = [];\n\n var f = function (element) {\n angular.forEach([\'$scope\', \'$isolateScope\'], function (scopeProperty) {\n if (element.data() && element.data()\n .hasOwnProperty(scopeProperty)) {\n angular.forEach(element.data()[scopeProperty].$$watchers, function (watcher) {\n watchers.push(watcher);\n });\n }\n });\n\n angular.forEach(element.children(), function (childElement) {\n f(angular.element(childElement));\n });\n };\n\n f(root);\n\n // Remove duplicate watchers\n var watchersWithoutDuplicates = [];\n angular.forEach(watchers, function (item) {\n if (watchersWithoutDuplicates.indexOf(item) < 0) {\n watchersWithoutDuplicates.push(item);\n if (printWatchers === true) {\n console.log(item);\n }\n }\n });\n\n console.log(watchersWithoutDuplicates.length);\n\n};"); $templateCache.put("/library/contextmenu/docs/demo.js","/*globals console, angular*/\n\n\'use strict\';\n\nvar demoApp = angular.module(\'isis.ui.contextmenu.demo\', [\'isis.ui.contextmenu\']);\n\ndemoApp.controller(\'ContextmenuCustomTemplateController\', function ($scope, contextmenuService) {\n $scope.parameter = {};\n\n $scope.closeClick = function () {\n console.log(\'closing this manually\');\n contextmenuService.close();\n };\n\n $scope.isValid = function (num) {\n console.log(\'Who knows if is valid?\', num);\n\n if (parseInt(num, 10) === 4) {\n $scope.parameter.invalid = false;\n } else {\n $scope.parameter.invalid = true;\n }\n };\n\n});\n\ndemoApp.controller(\'ContextmenuDemoController\', function ($scope) {\n\n var menuData = [{\n id: \'top\',\n items: [{\n id: \'newProject\',\n label: \'New project ...\',\n iconClass: \'glyphicon glyphicon-plus\',\n action: function () {\n console.log(\'New project clicked\');\n },\n actionData: {}\n }, {\n id: \'importProject\',\n label: \'Import project ...\',\n iconClass: \'glyphicon glyphicon-import\',\n action: function () {\n console.log(\'Import project clicked\');\n },\n actionData: {}\n }]\n }, {\n id: \'projects\',\n label: \'Recent projects\',\n totalItems: 20,\n items: [],\n showAllItems: function () {\n console.log(\'Recent projects clicked\');\n }\n }, {\n id: \'preferences\',\n label: \'preferences\',\n items: [{\n id: \'showPreferences\',\n label: \'Show preferences\',\n action: function () {\n console.log(\'Show preferences\');\n },\n menu: [{\n items: [{\n id: \'preferences 1\',\n label: \'Preferences 1\'\n }, {\n id: \'preferences 2\',\n label: \'Preferences 2\'\n }, {\n id: \'preferences 3\',\n label: \'Preferences 3\',\n menu: [{\n items: [{\n id: \'sub_preferences 1\',\n label: \'Sub preferences 1\'\n }, {\n id: \'sub_preferences 2\',\n label: \'Sub preferences 2\'\n }]\n }]\n }]\n }]\n }]\n }];\n\n $scope.menuConfig1 = {\n triggerEvent: \'click\',\n position: \'right bottom\'\n };\n\n $scope.menuConfig2 = {\n triggerEvent: \'mouseover\',\n position: \'left bottom\',\n contentTemplateUrl: \'contextmenu-custom-content.html\',\n doNotAutoClose: true,\n menuCssClass: \'green-shadow\'\n };\n\n $scope.menuData = menuData;\n\n $scope.preContextMenu = function (e) {\n console.log(\'In preContextMenu \', e);\n };\n\n\n});"); $templateCache.put("/library/dropdownNavigator/docs/demo.js","/*globals console, angular*/\n\'use strict\';\n\nvar demoApp = angular.module(\'isis.ui.dropdownNavigator.demo\', [\'isis.ui.dropdownNavigator\']);\n\ndemoApp.controller(\'DropdownDemoController\', function ($scope) {\n var firstMenu,\n secondMenu;\n\n firstMenu = {\n id: \'root\',\n label: \'GME\',\n // isSelected: true,\n itemClass: \'gme-root\',\n menu: []\n };\n\n secondMenu = {\n id: \'secondItem\',\n label: \'Projects\',\n menu: []\n };\n\n firstMenu.menu = [{\n id: \'top\',\n items: [{\n id: \'newProject\',\n label: \'New project ...\',\n iconClass: \'glyphicon glyphicon-plus\',\n action: function () {\n console.log(\'New project clicked\');\n },\n actionData: {}\n }, {\n id: \'importProject\',\n label: \'Import project ...\',\n iconClass: \'glyphicon glyphicon-import\',\n action: function () {\n console.log(\'Import project clicked\');\n },\n actionData: {}\n }]\n }, {\n id: \'projects\',\n label: \'Recent projects\',\n totalItems: 20,\n items: [],\n showAllItems: function () {\n console.log(\'Recent projects clicked\');\n }\n }, {\n id: \'preferences\',\n label: \'preferences\',\n items: [{\n id: \'showPreferences\',\n label: \'Show preferences\',\n action: function () {\n console.log(\'Show preferences\');\n },\n menu: [{\n items: [{\n id: \'preferences 1\',\n label: \'Preferences 1\'\n }, {\n id: \'preferences 2\',\n label: \'Preferences 2\'\n }, {\n id: \'preferences 3\',\n label: \'Preferences 3\',\n menu: [{\n items: [{\n id: \'sub_preferences 1\',\n label: \'Sub preferences 1\'\n }, {\n id: \'sub_preferences 2\',\n label: \'Sub preferences 2\'\n }]\n }]\n }]\n }]\n }]\n }];\n\n\n secondMenu = {\n id: \'secondItem\',\n label: \'Projects\',\n menu: []\n };\n\n secondMenu.menu = [{\n id: \'secondMenuMenu\',\n items: [\n\n {\n id: \'showPreferences\',\n label: \'Show preferences\',\n action: function () {\n console.log(\'Show preferences\');\n },\n menu: [{\n items: [{\n id: \'preferences 1\',\n label: \'Preferences 1\'\n }, {\n id: \'preferences 2\',\n label: \'Preferences 2\'\n }, {\n id: \'preferences 3\',\n label: \'Preferences 3\',\n menu: [{\n items: [{\n id: \'sub_preferences 1\',\n label: \'Sub preferences 1\'\n }, {\n id: \'sub_preferences 2\',\n label: \'Sub preferences 2\'\n }]\n }]\n }]\n }]\n }\n ]\n }];\n\n $scope.navigator = {\n items: [\n firstMenu,\n secondMenu\n ],\n separator: true\n };\n\n\n});"); $templateCache.put("/library/hierarchicalMenu/docs/demo.js","/*globals console, angular*/\n\'use strict\';\n\nvar demoApp = angular.module(\'isis.ui.hierarchicalMenu.demo\', [\n \'isis.ui.hierarchicalMenu\'\n]);\n\ndemoApp.controller(\'HierarchicalMenuDemoController\', function ($scope, $interval) {\n\n var menu,\n menuItemDisabledAndEnabled;\n\n menuItemDisabledAndEnabled = {\n id: \'menuItemDisabledAndEnabled\',\n disabled: true,\n label: \'Disabled by default\',\n iconClass: \'glyphicon glyphicon-remove\',\n action: function () {\n console.log(\'menuItemDisabledAndEnabled clicked\');\n },\n actionData: {}\n };\n\n menu = [{\n id: \'top\',\n items: [{\n id: \'newProject\',\n label: \'New project ...\',\n iconClass: \'glyphicon glyphicon-plus\',\n action: function () {\n console.log(\'New project clicked\');\n },\n actionData: {}\n }, {\n id: \'importProject\',\n label: \'Import project ...\',\n iconClass: \'glyphicon glyphicon-import\',\n action: function () {\n console.log(\'Import project clicked\');\n },\n actionData: {}\n }, {\n id: \'importProject_disabled\',\n disabled: true,\n label: \'Import project (disabled)...\',\n iconClass: \'glyphicon glyphicon-import\',\n action: function () {\n console.log(\'Import project disabled clicked\');\n },\n actionData: {}\n },\n menuItemDisabledAndEnabled]\n }, {\n id: \'projects\',\n label: \'Recent projects\',\n totalItems: 20,\n items: [],\n showAllItems: function () {\n console.log(\'Recent projects clicked\');\n }\n }, {\n id: \'preferences\',\n label: \'preferences\',\n items: [{\n id: \'showPreferences\',\n label: \'Show preferences\',\n action: function () {\n console.log(\'Show preferences\');\n },\n menu: [{\n items: [{\n id: \'preferences 1\',\n label: \'Preferences 1\'\n }, {\n id: \'preferences 2\',\n label: \'Preferences 2\'\n }, {\n id: \'preferences 3\',\n label: \'Preferences 3\',\n menu: [{\n items: [{\n id: \'sub_preferences 1\',\n label: \'Sub preferences 1\',\n action: function () {\n console.log(\'This should work\');\n }\n }, {\n id: \'sub_preferences 2\',\n label: \'Sub preferences 2\',\n action: function () {\n console.log(\'This should work\');\n }\n }]\n }]\n }, {\n id: \'preferences 3 (disabled)\',\n label: \'Preferences 3 (disabled)\',\n disabled: true,\n menu: [{\n items: [{\n id: \'sub_preferences 1 (disabled)\',\n label: \'Sub preferences 1 (disabled)\',\n action: function () {\n console.log(\'This should not work\');\n }\n }, {\n id: \'sub_preferences 2 (disabled)\',\n label: \'Sub preferences 2 (disabled)\',\n action: function () {\n console.log(\'This should not work\');\n }\n }]\n }]\n }]\n }]\n }]\n }];\n\n $scope.menu = menu;\n\n\n $interval(function () {\n // emulate that this menu item will be changed from the code through async functions.\n menuItemDisabledAndEnabled.disabled = !menuItemDisabledAndEnabled.disabled;\n if (menuItemDisabledAndEnabled.disabled) {\n menuItemDisabledAndEnabled.iconClass = \'glyphicon glyphicon-remove\';\n } else {\n menuItemDisabledAndEnabled.iconClass = \'glyphicon glyphicon-ok\';\n }\n }, 2000);\n});"); $templateCache.put("/library/itemList/docs/demo.js","/*globals angular*/\n\'use strict\';\n\nvar demoApp = angular.module(\'isis.ui.itemList.demo\', [\'isis.ui.itemList\']);\n\ndemoApp.controller(\'ListItemDetailsDemoController\', function ($scope) {\n $scope.parameter = {};\n\n $scope.isValid = function (num) {\n console.log(\'Who knows if is valid?\', num);\n\n if (parseInt(num, 10) === 4) {\n $scope.parameter.invalid = false;\n } else {\n $scope.parameter.invalid = true;\n }\n };\n\n\n});\n\ndemoApp.controller(\'ListItemDetailsDemoController2\', function ($scope) {\n var i,\n items2 = [],\n itemGenerator2,\n config;\n\n itemGenerator2 = function (id) {\n\n return {\n id: id,\n title: \'List sub-item \' + id,\n toolTip: \'Open item\',\n description: \'This is description here\',\n lastUpdated: {\n time: Date.now(),\n user: \'N/A\'\n\n },\n stats: [{\n value: id,\n tooltip: \'Orders\',\n iconClass: \'fa fa-cubes\'\n }],\n details: \'Some detailed text. Lorem ipsum ama fea rin the poc ketofmyja cket.\'\n };\n };\n\n\n for (i = 0; i < 20; i++) {\n items2.push(itemGenerator2(i));\n }\n\n config = {\n\n sortable: true,\n secondaryItemMenu: true,\n detailsCollapsible: false,\n showDetailsLabel: \'Show details\',\n hideDetailsLabel: \'Hide details\',\n\n // Event handlers\n\n itemSort: function (jQEvent, ui) {\n console.log(\'Sort happened\', jQEvent, ui);\n },\n\n itemClick: function (event, item) {\n console.log(\'Clicked: \' + item);\n },\n\n itemContextmenuRenderer: function (e, item) {\n console.log(\'Contextmenu was triggered for node:\', item);\n\n return [{\n items: [\n\n {\n id: \'create\',\n label: \'Create new\',\n disabled: true,\n iconClass: \'fa fa-plus\'\n }\n ]\n }];\n },\n\n detailsRenderer: function (item) {\n item.details = \'My details are here now!\';\n },\n\n newItemForm: {\n title: \'Create new item\',\n itemTemplateUrl: \'/library/itemList/docs/newItemTemplate.html\',\n expanded: false,\n controller: function ($scope) {\n $scope.createItem = function (newItem) {\n\n newItem.url = \'something\';\n newItem.toolTip = newItem.title;\n\n items2.push(newItem);\n\n $scope.newItem = {};\n\n config.newItemForm.expanded = false; // this is how you close the form itself\n\n };\n }\n }\n\n };\n\n $scope.listData2 = {\n items: items2\n };\n\n $scope.config2 = config;\n\n});\n\ndemoApp.directive(\'demoSubList\', function () {\n return {\n restrict: \'E\',\n replace: false,\n scope: {\n listData: \'=\',\n config: \'=\'\n },\n template: \'<item-list list-data=\"listData\" config=\"config\" class=\"col-md-12\"></item-list>\'\n };\n});\n\ndemoApp.controller(\'ItemListDemoController\', function ($scope) {\n\n\n var\n i,\n\n items = [],\n\n itemGenerator,\n getItemContextmenu,\n config;\n\n itemGenerator = function (id) {\n\n var lastUpdated;\n\n if (Math.random() > 0.5) {\n lastUpdated = {\n time: Date.now(),\n user: \'N/A\'\n\n };\n }\n\n return {\n id: id,\n title: \'List item \' + id,\n cssClass: \'my-item\',\n toolTip: \'Open item\',\n description: \'This is description here\',\n headerTemplateUrl: Math.random() > 0.5 ?\n \'/library/itemList/docs/headerTemplate.html\' : undefined,\n taxonomyTerms: [{\n id: \'tag1\',\n name: \'Tag A\',\n url: \'http://vanderbilt.edu\'\n }, {\n id: \'tag2\',\n name: \'Tag B\',\n url: \'http://vanderbilt.edu\'\n }],\n lastUpdated: lastUpdated,\n stats: [{\n value: id,\n toolTip: \'Orders\',\n iconClass: \'fa fa-cubes\'\n }],\n details: \'Some detailed text. Lorem ipsum ama fea rin the poc ketofmyja cket.\',\n detailsTemplateUrl: Math.random() < 0.5 ? \'list-item-details.html\' : \'list-item-details2.html\'\n };\n };\n\n\n for (i = 0; i < 20; i++) {\n items.push(itemGenerator(i));\n }\n\n getItemContextmenu = function (item) {\n\n var defaultItemContextmenu = [{\n items: [{\n id: \'create\',\n label: \'Create new\',\n disabled: true,\n iconClass: \'fa fa-plus\'\n }, {\n id: \'dummy\',\n label: \'Just for test \' + item.id,\n\n actionData: item,\n\n action: function (data) {\n console.log(\'testing \', data);\n }\n\n }, {\n id: \'rename\',\n label: \'Rename\'\n }, {\n id: \'preferences 3\',\n label: \'Preferences 3\',\n menu: [{\n items: [{\n id: \'sub_preferences 1\',\n label: \'Sub preferences 1\'\n }, {\n id: \'sub_preferences 2\',\n label: \'Sub preferences 2\',\n action: function (data) {\n console.log(\'testing2 \', data);\n }\n }]\n }]\n }]\n }];\n\n return defaultItemContextmenu;\n\n };\n\n config = {\n\n //sortable: true,\n onItemDragStart: function(e, item) {\n console.log(\'Start dragging\', item);\n },\n\n onItemDragEnd: function(e, item) {\n console.log(\'Finish dragging\', item);\n },\n\n secondaryItemMenu: true,\n detailsCollapsible: true,\n showDetailsLabel: \'Show details\',\n hideDetailsLabel: \'Hide details\',\n\n noItemsMessage: \'List is empty.\',\n\n // Event handlers\n\n itemSort: function (jQEvent, ui) {\n console.log(\'Sort happened\', jQEvent, ui);\n },\n\n itemClick: function (event, item) {\n console.log(\'Clicked: \' + item);\n },\n\n itemContextmenuRenderer: function (e, item) {\n console.log(\'Contextmenu was triggered for node:\', item);\n\n return getItemContextmenu(item);\n },\n\n detailsRenderer: function (item) {\n item.details = \'My details are here now!\';\n },\n\n newItemForm: {\n title: \'Create new item\',\n itemTemplateUrl: \'/library/itemList/docs/newItemTemplate.html\',\n expanded: false,\n controller: function ($scope) {\n $scope.createItem = function (newItem) {\n\n newItem.url = \'something\';\n newItem.toolTip = newItem.title;\n\n items.push(newItem);\n\n $scope.newItem = {};\n\n config.newItemForm.expanded = false; // this is how you close the form itself\n\n };\n }\n },\n\n filter: {}\n\n };\n\n $scope.listData = {\n items: items\n };\n\n $scope.config = config;\n\n});"); $templateCache.put("/library/searchBox/docs/demo.js","/*globals angular*/\n\'use strict\';\n\nvar demoApp = angular.module(\'isis.ui.searchBox.demo\', [\'isis.ui.searchBox\']);\n\ndemoApp.controller(\'SearchBoxDemoController\', function () {\n\n});"); $templateCache.put("/library/simpleDialog/docs/demo.js","/*globals console, angular*/\n\n\'use strict\';\n\nvar isValid,\n demoApp = angular.module(\'isis.ui.simpleDialog.demo\', [\'isis.ui.simpleDialog\']),\n\n parameter = {\n value: 10,\n invalid: true\n };\n\ndemoApp.controller(\'ConfirmDialogDemoController\', function ($scope, $simpleDialog) {\n\n isValid = function () {\n\n var result = (Number(parameter.value) === 4);\n\n console.log(\'Validator was called\');\n console.log(\'Sum is: \' + parameter.value, result);\n parameter.invalid = !result;\n\n return result;\n\n };\n\n\n $scope.parameter = parameter;\n\n $scope.isValid = function () {\n isValid();\n if (!$scope.$$phase) {\n $scope.$apply();\n }\n };\n\n $scope.openDialog = function () {\n\n $simpleDialog.open({\n dialogTitle: \'Are you sure?\',\n dialogContentTemplate: \'confirm-content-template\',\n onOk: function () {\n console.log(\'OK was picked\');\n },\n onCancel: function () {\n console.log(\'This was canceled\');\n },\n validator: isValid,\n size: \'lg\', // can be sm or lg\n scope: $scope\n });\n\n };\n\n\n});\n\ndemoApp.controller(\'ConfirmDialogDemoDataController\', function () {\n\n});"); $templateCache.put("/library/treeNavigator/docs/demo.js","/*globals angular*/\n\'use strict\';\n\nrequire(\'ngDragDrop\');\n\nvar demoApp = angular.module(\'isis.ui.treeNavigator.demo\', [\n \'isis.ui.treeNavigator\',\n \'ang-drag-drop\'\n]);\n\ndemoApp.controller(\'TreeNavigatorDemoController\', function($scope, $log, $q, $timeout) {\n\n var config,\n treeNodes = {},\n\n addNode,\n removeNode,\n getNodeContextmenu,\n dummyTreeDataGenerator,\n sortChildren;\n\n getNodeContextmenu = function(node) {\n\n var defaultNodeContextmenu = [{\n items: [{\n id: \'create\',\n label: \'Create new\',\n disabled: true,\n iconClass: \'fa fa-plus\',\n menu: []\n }, {\n id: \'dummy\',\n label: \'Just for test \' + node.id,\n\n actionData: node,\n\n action: function(data) {\n $log.log(\'testing \', data);\n }\n\n }, {\n id: \'rename\',\n label: \'Rename\'\n }, {\n id: \'delete\',\n label: \'Delete\',\n iconClass: \'fa fa-minus\',\n actionData: {\n id: node.id\n },\n action: function(data) {\n removeNode(data.id);\n }\n }, {\n id: \'preferences 3\',\n label: \'Preferences 3\',\n menu: [{\n items: [{\n id: \'sub_preferences 1\',\n label: \'Sub preferences 1\'\n }, {\n id: \'sub_preferences 2\',\n label: \'Sub preferences 2\',\n action: function(data) {\n $log.log(\'testing2 \', data);\n }\n }]\n }]\n }]\n }];\n\n return defaultNodeContextmenu;\n\n };\n\n dummyTreeDataGenerator = function(treeNode, name, maxCount, levels, idOffset) {\n var i,\n id,\n count,\n childNode;\n\n levels = levels || 0;\n\n count = maxCount;\n\n for (i = 0; i < count; i += 1) {\n id = name + (i + (idOffset || 0));\n\n childNode = addNode(treeNode, id, i);\n\n if (levels > 0) {\n dummyTreeDataGenerator(childNode, id + \'.\', maxCount, levels - 1);\n }\n }\n\n return treeNode.children;\n\n };\n\n addNode = function(parentTreeNode, id, i) {\n var newTreeNode,\n children = [];\n\n\n // node structure\n newTreeNode = {\n label: id,\n extraInfo: \'Extra info\',\n children: children,\n childrenCount: 0,\n nodeData: {},\n iconClass: \'fa fa-file-o\',\n\n draggable: true,\n dragChannel: \'a\',\n dropChannel: (Math.random() > 0.5) ? \'a\' : \'b\',\n order: i\n };\n\n newTreeNode.id = id;\n\n // add the new node to the map\n treeNodes[newTreeNode.id] = newTreeNode;\n\n\n if (parentTreeNode) {\n // if a parent was given add the new node as a child node\n parentTreeNode.iconClass = undefined;\n parentTreeNode.children.push(newTreeNode);\n\n\n parentTreeNode.childrenCount = parentTreeNode.children.length;\n\n if (newTreeNode.childrenCount === 0) {\n newTreeNode.childrenCount = 5000;\n }\n\n\n if (newTreeNode.childrenCount) {\n newTreeNode.iconClass = undefined;\n }\n\n sortChildren(parentTreeNode.children);\n\n newTreeNode.parentId = parentTreeNode.id;\n } else {\n\n // if no parent is given replace the current root node with this node\n $scope.treeData = newTreeNode;\n $scope.treeData.unCollapsible = true;\n newTreeNode.parentId = null;\n }\n\n return newTreeNode;\n };\n\n removeNode = function(id) {\n var\n parentNode,\n nodeToDelete = treeNodes[id];\n\n $log.debug(\'Removing a node \' + id);\n\n if (nodeToDelete) {\n if (nodeToDelete.parentId !== null && treeNodes[nodeToDelete.parentId] !==\n undefined) {\n // find parent node\n parentNode = treeNodes[nodeToDelete.parentId];\n\n // remove nodeToDelete from parent node\'s children\n parentNode.children = parentNo