├── css ├── PrologHelper.js ├── configuration.less ├── background.png ├── tree_table.png ├── drag-handle.png ├── tree_drawing.png ├── tree_struct.png ├── background_drak.jpg ├── aristo │ └── images │ │ ├── bg_fallback.png │ │ ├── icon_sprite.png │ │ ├── progress_bar.gif │ │ ├── slider_handles.png │ │ ├── ui-icons_222222_256x240.png │ │ └── ui-icons_454545_256x240.png ├── styles.less ├── slickgrid.css └── jquery.layout.css ├── gfx ├── darkGrid.png ├── download.png ├── settings.png ├── upload.png ├── shape_rule.png ├── tree_table.png ├── shape_comment.png ├── shape_dcgrule.png ├── shape_findall.png ├── shape_formula.png ├── shape_group.png ├── shape_logic.png ├── shape_table.png ├── tree_drawing.png ├── tree_struct.png ├── shape_dcgterminal.png └── index.php ├── lib ├── dist │ └── themes │ │ ├── default │ │ ├── 32px.png │ │ ├── 40px.png │ │ └── throbber.gif │ │ └── default-dark │ │ ├── 32px.png │ │ ├── 40px.png │ │ └── throbber.gif ├── Slickgrid │ ├── Images │ │ └── drag-handle.png │ ├── slick.formatters.js │ ├── Plugins │ │ ├── slick.cellrangedecorator.js │ │ ├── slick.cellcopymanager.js │ │ ├── slick.autotooltips.js │ │ └── slick.cellselectionmodel.js │ └── slick-default-theme.css ├── fancytree_dist │ ├── skin-xp │ │ ├── icons.gif │ │ ├── vline.gif │ │ ├── loading.gif │ │ ├── icons-rtl.gif │ │ ├── vline-rtl.gif │ │ └── ui.fancytree.less │ ├── skin-lion │ │ ├── icons.gif │ │ ├── vline.gif │ │ ├── loading.gif │ │ ├── icons-rtl.gif │ │ ├── vline-rtl.gif │ │ └── ui.fancytree.less │ ├── skin-win7 │ │ ├── icons.gif │ │ ├── vline.gif │ │ ├── loading.gif │ │ ├── icons-rtl.gif │ │ ├── vline-rtl.gif │ │ └── ui.fancytree.less │ ├── skin-win8 │ │ ├── icons.gif │ │ ├── vline.gif │ │ ├── loading.gif │ │ ├── icons-rtl.gif │ │ ├── vline-rtl.gif │ │ └── ui.fancytree.less │ ├── skin-awesome │ │ ├── vline.gif │ │ ├── vline-rtl.gif │ │ └── ui.fancytree.less │ ├── skin-vista │ │ ├── icons.gif │ │ ├── loading.gif │ │ ├── vline.gif │ │ ├── icons-rtl.gif │ │ ├── vline-rtl.gif │ │ └── ui.fancytree.less │ ├── skin-win8-n │ │ ├── icons.gif │ │ ├── vline.gif │ │ ├── loading.gif │ │ ├── icons-rtl.gif │ │ ├── vline-rtl.gif │ │ └── ui.fancytree.less │ ├── skin-bootstrap │ │ ├── vline.gif │ │ └── vline-rtl.gif │ ├── skin-material │ │ ├── vline.gif │ │ ├── vline-rtl.gif │ │ └── ui.fancytree.less │ ├── skin-win8-xxl │ │ ├── icons.gif │ │ ├── vline.gif │ │ ├── icons-rtl.gif │ │ ├── loading.gif │ │ ├── vline-rtl.gif │ │ └── ui.fancytree.less │ ├── skin-bootstrap-n │ │ ├── vline.gif │ │ ├── vline-rtl.gif │ │ └── ui.fancytree.less │ ├── skin-themeroller │ │ ├── icons.gif │ │ ├── vline.gif │ │ ├── loading.gif │ │ ├── icons-rtl.gif │ │ ├── vline-rtl.gif │ │ └── ui.fancytree.less │ ├── skin-custom-1 │ │ └── README.md │ ├── LICENSE.txt │ └── modules │ │ ├── jquery.fancytree.multi.js │ │ ├── jquery.fancytree.themeroller.js │ │ ├── jquery.fancytree.menu.js │ │ ├── jquery.fancytree.columnview.js │ │ └── jquery.fancytree.gridnav.js ├── jquery.browser.js ├── codemirror │ ├── theme │ │ └── tau.css │ ├── mode │ │ └── prolog │ │ │ └── prolog.js │ └── addon │ │ ├── scrollffff │ │ ├── simplescrollbars.css │ │ └── simplescrollbars.js │ │ └── placeholder │ │ └── placeholder.js ├── jquery.fancytree.contextMenu.wwwendt.js ├── contextMenu │ ├── jquery.fancytree.contextMenu.js │ └── jquery.fancytree.contextMenuold.js ├── jquery.fancytree.contextMenu.js └── Class.exec.js ├── app ├── ShapePalette.js ├── Shapes │ ├── Port.js │ ├── DraggablePort.js │ ├── StraightConnector.js │ ├── CommentShape.js │ ├── PrologText.js │ ├── DcgTerminalShape.js │ └── LogicShape.js ├── FolderPanel.js ├── DrawingPanel.js ├── my_module.js ├── MatchConnector.js ├── PrattParser.js └── TablePanel.js ├── LICENSE └── README.md /css/PrologHelper.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/configuration.less: -------------------------------------------------------------------------------- 1 | @toolbarHeight:64px; 2 | @propertiesWidth:50px; 3 | 4 | -------------------------------------------------------------------------------- /gfx/darkGrid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/gfx/darkGrid.png -------------------------------------------------------------------------------- /gfx/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/gfx/download.png -------------------------------------------------------------------------------- /gfx/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/gfx/settings.png -------------------------------------------------------------------------------- /gfx/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/gfx/upload.png -------------------------------------------------------------------------------- /css/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/css/background.png -------------------------------------------------------------------------------- /css/tree_table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/css/tree_table.png -------------------------------------------------------------------------------- /gfx/shape_rule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/gfx/shape_rule.png -------------------------------------------------------------------------------- /gfx/tree_table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/gfx/tree_table.png -------------------------------------------------------------------------------- /css/drag-handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/css/drag-handle.png -------------------------------------------------------------------------------- /css/tree_drawing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/css/tree_drawing.png -------------------------------------------------------------------------------- /css/tree_struct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/css/tree_struct.png -------------------------------------------------------------------------------- /gfx/shape_comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/gfx/shape_comment.png -------------------------------------------------------------------------------- /gfx/shape_dcgrule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/gfx/shape_dcgrule.png -------------------------------------------------------------------------------- /gfx/shape_findall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/gfx/shape_findall.png -------------------------------------------------------------------------------- /gfx/shape_formula.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/gfx/shape_formula.png -------------------------------------------------------------------------------- /gfx/shape_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/gfx/shape_group.png -------------------------------------------------------------------------------- /gfx/shape_logic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/gfx/shape_logic.png -------------------------------------------------------------------------------- /gfx/shape_table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/gfx/shape_table.png -------------------------------------------------------------------------------- /gfx/tree_drawing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/gfx/tree_drawing.png -------------------------------------------------------------------------------- /gfx/tree_struct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/gfx/tree_struct.png -------------------------------------------------------------------------------- /css/background_drak.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/css/background_drak.jpg -------------------------------------------------------------------------------- /gfx/shape_dcgterminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/gfx/shape_dcgterminal.png -------------------------------------------------------------------------------- /css/aristo/images/bg_fallback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/css/aristo/images/bg_fallback.png -------------------------------------------------------------------------------- /css/aristo/images/icon_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/css/aristo/images/icon_sprite.png -------------------------------------------------------------------------------- /lib/dist/themes/default/32px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/dist/themes/default/32px.png -------------------------------------------------------------------------------- /lib/dist/themes/default/40px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/dist/themes/default/40px.png -------------------------------------------------------------------------------- /css/aristo/images/progress_bar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/css/aristo/images/progress_bar.gif -------------------------------------------------------------------------------- /css/aristo/images/slider_handles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/css/aristo/images/slider_handles.png -------------------------------------------------------------------------------- /lib/Slickgrid/Images/drag-handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/Slickgrid/Images/drag-handle.png -------------------------------------------------------------------------------- /lib/dist/themes/default/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/dist/themes/default/throbber.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-xp/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-xp/icons.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-xp/vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-xp/vline.gif -------------------------------------------------------------------------------- /lib/dist/themes/default-dark/32px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/dist/themes/default-dark/32px.png -------------------------------------------------------------------------------- /lib/dist/themes/default-dark/40px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/dist/themes/default-dark/40px.png -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-lion/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-lion/icons.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-lion/vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-lion/vline.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win7/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win7/icons.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win7/vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win7/vline.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win8/icons.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8/vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win8/vline.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-xp/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-xp/loading.gif -------------------------------------------------------------------------------- /lib/dist/themes/default-dark/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/dist/themes/default-dark/throbber.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-awesome/vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-awesome/vline.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-lion/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-lion/loading.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-vista/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-vista/icons.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-vista/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-vista/loading.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-vista/vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-vista/vline.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win7/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win7/loading.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8-n/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win8-n/icons.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8-n/vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win8-n/vline.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win8/loading.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-xp/icons-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-xp/icons-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-xp/vline-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-xp/vline-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-bootstrap/vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-bootstrap/vline.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-lion/icons-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-lion/icons-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-lion/vline-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-lion/vline-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-material/vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-material/vline.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-vista/icons-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-vista/icons-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-vista/vline-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-vista/vline-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win7/icons-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win7/icons-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win7/vline-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win7/vline-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8-n/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win8-n/loading.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8-xxl/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win8-xxl/icons.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8-xxl/vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win8-xxl/vline.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8/icons-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win8/icons-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8/vline-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win8/vline-rtl.gif -------------------------------------------------------------------------------- /css/aristo/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/css/aristo/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /css/aristo/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/css/aristo/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-awesome/vline-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-awesome/vline-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-bootstrap-n/vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-bootstrap-n/vline.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-material/vline-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-material/vline-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-themeroller/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-themeroller/icons.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-themeroller/vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-themeroller/vline.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8-n/icons-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win8-n/icons-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8-n/vline-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win8-n/vline-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8-xxl/icons-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win8-xxl/icons-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8-xxl/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win8-xxl/loading.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8-xxl/vline-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-win8-xxl/vline-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-bootstrap/vline-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-bootstrap/vline-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-themeroller/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-themeroller/loading.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-bootstrap-n/vline-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-bootstrap-n/vline-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-themeroller/icons-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-themeroller/icons-rtl.gif -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-themeroller/vline-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toblotron/praxis-ide/HEAD/lib/fancytree_dist/skin-themeroller/vline-rtl.gif -------------------------------------------------------------------------------- /gfx/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/ShapePalette.js: -------------------------------------------------------------------------------- 1 | /* 2 | This class handles the Shape Palette view 3 | */ 4 | 5 | praxis.ShapePalette = Class.extend({ 6 | 7 | init:function(element_id){ 8 | this.self = this; 9 | this.html = $("#"+element_id); 10 | this.elem = document.getElementById(element_id); 11 | 12 | }, 13 | 14 | hide: function(){ 15 | this.elem.style.display = "none"; 16 | }, 17 | 18 | show: function(){ 19 | this.elem.style.display = "block"; 20 | } 21 | 22 | }); -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-custom-1/README.md: -------------------------------------------------------------------------------- 1 | ### Creating Custom Skins 2 | 3 | 1. Create a folder like this (recommended name: 'src/skin-custom-...') 4 | 2. For a start, copy files from one of the existing skin folders (src/skin-...) 5 | to the custom folder: 6 | - ui.fancytree.less (required) 7 | - icons.gif (if needed) 8 | - loading.gif (if needed) 9 | 3. cd to your fancytree folder and run `grunt dev` from the console.
10 | Note: NPM and Grunt are required. 11 | Read [how to install the toolset](https://github.com/mar10/fancytree/wiki/HowtoContribute#install-the-source-code-and-tools-for-debugging-and-contributing). 12 | 4. Edit and save your ui.fancytree.less file.
13 | The `ui.fancytree.css` will be generated and updated automatically from 14 | the LESS file. 15 | -------------------------------------------------------------------------------- /lib/jquery.browser.js: -------------------------------------------------------------------------------- 1 | // $.browser function 2 | 3 | // required to be compatible with jquery.layout and jquery.handsontable 4 | // 5 | jQuery.uaMatch = function( ua ) { 6 | ua = ua.toLowerCase(); 7 | var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || 8 | /(webkit)[ \/]([\w.]+)/.exec( ua ) || 9 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || 10 | /(msie) ([\w.]+)/.exec( ua ) || 11 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || 12 | []; 13 | return { 14 | browser: match[ 1 ] || "", 15 | version: match[ 2 ] || "0" 16 | }; 17 | }; 18 | if ( !jQuery.browser ) { 19 | matched = jQuery.uaMatch( navigator.userAgent ); 20 | browser = {}; 21 | if ( matched.browser ) { 22 | browser[ matched.browser ] = true; 23 | browser.version = matched.version; 24 | } 25 | // Chrome is Webkit, but Webkit is also Safari. 26 | if ( browser.chrome ) { 27 | browser.webkit = true; 28 | } else if ( browser.webkit ) { 29 | browser.safari = true; 30 | } 31 | jQuery.browser = browser; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Torbjörn Josefsson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /lib/fancytree_dist/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2008-2020 Martin Wendt, 2 | https://wwWendt.de/ 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /lib/codemirror/theme/tau.css: -------------------------------------------------------------------------------- 1 | /* tau prolog theme for codemirror */ 2 | 3 | /* Color scheme */ 4 | 5 | .cm-s-tau.CodeMirror { 6 | background-color:#000000; 7 | color:rgb(156, 156, 156); 8 | font-size: 10pt; 9 | line-height:1.4375; 10 | } 11 | .cm-s-tau .cm-comment { color:green; } 12 | .cm-s-tau .cm-atom { color:green; } 13 | .cm-s-tau .cm-variable { color:rgb(69, 69, 255); } 14 | .cm-s-tau .cm-number { color: red !important; } 15 | .cm-s-tau .cm-string { color: green !important; } 16 | .cm-s-tau .cm-graphic { color: #b35e14 !important; } 17 | 18 | /* Editor styling */ 19 | 20 | .cm-s-tau pre { 21 | padding:0; 22 | } 23 | 24 | .cm-s-tau .CodeMirror-gutters { 25 | border:none; 26 | border-right:10px solid transparent; 27 | background-color:transparent; 28 | } 29 | 30 | .cm-s-tau .CodeMirror-linenumber { 31 | padding:0; 32 | color:#888888; 33 | } 34 | 35 | .cm-s-tau .CodeMirror-guttermarker { color: #1d75b3; } 36 | .cm-s-tau .CodeMirror-guttermarker-subtle { color: #e0e2e5; } 37 | 38 | .cm-s-tau .CodeMirror-cursor { 39 | width: 2px; 40 | border: 0; 41 | background: rgba(0, 255, 17, 0.991); 42 | z-index: 1; 43 | } 44 | 45 | .CodeMirror pre.CodeMirror-placeholder { 46 | color: #bfbfbf; 47 | } 48 | -------------------------------------------------------------------------------- /app/Shapes/Port.js: -------------------------------------------------------------------------------- 1 | var Port = fabric.util.createClass(fabric.Circle, { 2 | type: 'port', 3 | // initialize can be of type function(options) or function(property, options), like for text. 4 | // no other signatures allowed. 5 | initialize: function(options) { 6 | options || (options = { }); 7 | this.callSuper('initialize', options); 8 | 9 | this.set({ 10 | selectable: false, 11 | strokeWidth: 0.5, 12 | originX: 'center', 13 | originY: 'center', 14 | fill: '#555', 15 | stroke: 'black', 16 | radius: 5, 17 | visible: false, 18 | targetFindTolerance: 10 19 | }); 20 | 21 | this.on('mouseover',function(options){ 22 | if (options.target) { 23 | app.view.portMouseover(this); 24 | } 25 | }); 26 | this.on('mouseout',function(options){ 27 | if (options.target) { 28 | app.view.portMouseout(this); 29 | } 30 | }); 31 | }, 32 | 33 | toObject: function() { 34 | return fabric.util.object.extend(this.callSuper('toObject'), {}); 35 | }, 36 | 37 | _render: function(ctx) { 38 | this.callSuper('_render', ctx); 39 | 40 | ctx.font = '20px Helvetica'; 41 | ctx.fillStyle = '#222'; 42 | } 43 | }); -------------------------------------------------------------------------------- /lib/codemirror/mode/prolog/prolog.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineSimpleMode("prolog", { 2 | start: [ 3 | {regex: /"/, token: 'string', next: 'string_double_quote'}, 4 | {regex: /`/, token: 'string', next: 'string_back_quote'}, 5 | {regex: /'/, token: 'atom', next: 'atom'}, 6 | {regex: /[a-z][0-9a-zA-Z_]*/, token: 'atom'}, 7 | {regex: /\s*(?:(?:%.*)|(?:\s+))\s*/, token: 'comment'}, 8 | {regex: /\/\*/, token: 'comment', next: 'comment'}, 9 | {regex: /(?:[A-Z_][a-zA-Z0-9_]*)/, token: 'variable'}, 10 | {regex: /(?:0o[0-7]+|0x[0-9a-f]+|0b[01]+|0'(?:''|\\[abfnrtv\\'"`]|\\x?\d+\\|.)|\d+(?:\.\d+(?:e[+-]?\d+)?)?)/, token: 'number'}, 11 | {regex: /([#\$\&\*\+\-\.\/\:\<\=\>\?@\^\~\\]+)/, token: 'graphic'}, 12 | {regex: /\./, token: 'point'}, 13 | {regex: /\!/, token: 'cut'}, 14 | {regex: /[,;\(\)]/, token: 'paren'}, 15 | {regex: /\s+/, token: null}, 16 | {regex: /./, token: 'error'} 17 | ], 18 | 19 | comment: [ 20 | {regex: /.*?\*\//, token: 'comment', next: 'start'}, 21 | {regex: /.*/, token: 'comment'} 22 | ], 23 | 24 | atom: [ 25 | {regex: /'/, token: 'atom', next: 'start'}, 26 | {regex: /(?:\\(?:x?\d+)?\\)|(?:'')|(?:\\')|[^']/, token: 'atom'} 27 | ], 28 | 29 | string_double_quote: [ 30 | {regex: /"/, token: 'string', next: 'start'}, 31 | {regex: /[^"]|""|\\"/, token: 'string'} 32 | ], 33 | 34 | string_back_quote: [ 35 | {regex: /`/, token: 'string', next: 'start'}, 36 | {regex: /[^`]|``|\\`/, token: 'string'} 37 | ] 38 | }); -------------------------------------------------------------------------------- /app/Shapes/DraggablePort.js: -------------------------------------------------------------------------------- 1 | var DraggablePort = fabric.util.createClass(fabric.Circle, { 2 | type: 'draggablePort', 3 | // initialize can be of type function(options) or function(property, options), like for text. 4 | // no other signatures allowed. 5 | initialize: function(options) { 6 | options || (options = { }); 7 | this.callSuper('initialize', options); 8 | 9 | this.set({ 10 | strokeWidth: 0.5, 11 | originX: 'center', 12 | originY: 'center', 13 | fill: 'gray', 14 | stroke: 'black', 15 | radius: 8, 16 | hasBorders: false, 17 | //selectable: false, 18 | hasControls:false, 19 | fill: '#1f5' 20 | }); 21 | 22 | this.on('mouseout',function(options){ 23 | //if (options.target) { 24 | this.view.dragPortMouseout(this); 25 | //} 26 | }); 27 | 28 | this.on('mousedown',function(options){ 29 | if (options.target) { 30 | this.view.dragPortMousedown(this); 31 | } 32 | }); 33 | 34 | }, 35 | 36 | toObject: function() { 37 | return fabric.util.object.extend(this.callSuper('toObject'), {}); 38 | }, 39 | 40 | _render: function(ctx) { 41 | this.callSuper('_render', ctx); 42 | ctx.font = '20px Helvetica'; 43 | ctx.fillStyle = '#333'; 44 | } 45 | }); -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8-xxl/ui.fancytree.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Fancytree "Win8" 32x32 skin. 3 | * 4 | * DON'T EDIT THE CSS FILE DIRECTLY, since it is automatically generated from 5 | * the LESS templates. 6 | */ 7 | 8 | // Import common styles 9 | @import "../skin-common.less"; 10 | 11 | // Import standard win8 12 | @import "../skin-win8/ui.fancytree.less"; 13 | 14 | 15 | // Override the variable after the import. 16 | // NOTE: Variables are always resolved as the last definition, even if it is 17 | // after where it is used. 18 | @fancy-use-sprites: true; // false: suppress all background images (i.e. icons) 19 | 20 | @fancy-level-indent: 32px; 21 | @fancy-line-height: 32px; // height of a nodes selection bar including borders 22 | @fancy-node-v-spacing: 1px; // gap between two node borders 23 | @fancy-icon-width: 32px; 24 | @fancy-icon-height: 32px; 25 | @fancy-icon-spacing: 6px; // margin between icon/icon or icon/title 26 | @fancy-icon-ofs-top: 0px; // extra vertical offset for expander, checkbox and icon 27 | @fancy-title-ofs-top: 0px; // extra vertical offset for title 28 | @fancy-node-border-width: 1px; 29 | @fancy-node-border-radius: 0px; 30 | @fancy-node-outline-width: 1px; 31 | 32 | // We need to define this variable here (not in skin-common.less) to make it 33 | // work with grunt and webpack: 34 | @fancy-image-prefix: "./skin-win8-xxl/"; 35 | 36 | ul.fancytree-container { 37 | // font-family: tahoma, arial, helvetica; 38 | font-size: 20pt; 39 | padding: 6px; 40 | } 41 | -------------------------------------------------------------------------------- /app/FolderPanel.js: -------------------------------------------------------------------------------- 1 | /* 2 | This class handles the Folder panel-view 3 | */ 4 | 5 | praxis.FolderPanel = Class.extend({ 6 | 7 | init:function(element_id){ 8 | this.self = this; 9 | this.html = $("#"+element_id); 10 | this.elem = document.getElementById(element_id); 11 | }, 12 | 13 | hide: function(){ 14 | this.html.html(""); 15 | this.elem.style.display = "none"; 16 | }, 17 | 18 | show: function(){ 19 | this.elem.style.display = "block"; 20 | }, 21 | 22 | showPanel: function(treeNode){ 23 | 24 | this.elem.style.display = "block"; 25 | this.html.html(""); 26 | this.html.append('
'+ 27 | '
'+ 28 | '
'+ 29 | '
Folder
' + 30 | ' '); 31 | 32 | this.html.append( 33 | ' '+ 34 | '
'+ 35 | '
'+ 36 | '
'); 37 | 38 | $("#folder_ok_button").on("click", function(){ 39 | 40 | var newTitle=$("#folder_name").val(); 41 | 42 | treeNode.setTitle(newTitle); 43 | app.treemenu.copyStructureFromTree(); 44 | //app.updateHeading(treeNode); 45 | }); 46 | 47 | 48 | 49 | } 50 | 51 | }); -------------------------------------------------------------------------------- /app/DrawingPanel.js: -------------------------------------------------------------------------------- 1 | /* 2 | This class handles the Drawing panel-view 3 | */ 4 | 5 | praxis.DrawingPanel = Class.extend({ 6 | 7 | init:function(element_id){ 8 | this.self = this; 9 | this.html = $("#"+element_id); 10 | this.elem = document.getElementById(element_id); 11 | }, 12 | 13 | hide: function(){ 14 | this.html.html(""); 15 | this.elem.style.display = "none"; 16 | }, 17 | 18 | show: function(){ 19 | this.elem.style.display = "block"; 20 | }, 21 | 22 | showPanel: function(drawingData){ 23 | 24 | this.elem.style.display = "block"; 25 | this.html.html(""); 26 | this.html.append('
'+ 27 | '
'+ 28 | '
'+ 29 | '
Drawing
' + 30 | ' '); 31 | 32 | this.html.append( 33 | ' '+ 34 | '
'+ 35 | '
'+ 36 | '
'); 37 | 38 | $("#drawing_ok_button").on("click", function(){ 39 | 40 | drawingData.name=$("#drawing_name").val(); 41 | var treeNode = app.treemenu.getTreeNode('rules', drawingData.id); 42 | 43 | treeNode.setTitle(drawingData.name); 44 | app.updateHeading(treeNode); 45 | }); 46 | 47 | 48 | 49 | } 50 | 51 | }); -------------------------------------------------------------------------------- /lib/codemirror/addon/scrollffff/simplescrollbars.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-simplescroll-horizontal div, .CodeMirror-simplescroll-vertical div { 2 | position: absolute; 3 | background: #ccc; 4 | -moz-box-sizing: border-box; 5 | box-sizing: border-box; 6 | border: 1px solid #bbb; 7 | border-radius: 2px; 8 | } 9 | 10 | .CodeMirror-simplescroll-horizontal, .CodeMirror-simplescroll-vertical { 11 | position: absolute; 12 | z-index: 6; 13 | background: #eee; 14 | } 15 | 16 | .CodeMirror-simplescroll-horizontal { 17 | bottom: 0; left: 0; 18 | height: 8px; 19 | } 20 | .CodeMirror-simplescroll-horizontal div { 21 | bottom: 0; 22 | height: 100%; 23 | } 24 | 25 | .CodeMirror-simplescroll-vertical { 26 | right: 0; top: 0; 27 | width: 8px; 28 | } 29 | .CodeMirror-simplescroll-vertical div { 30 | right: 0; 31 | width: 100%; 32 | } 33 | 34 | 35 | .CodeMirror-overlayscroll .CodeMirror-scrollbar-filler, .CodeMirror-overlayscroll .CodeMirror-gutter-filler { 36 | display: none; 37 | } 38 | 39 | .CodeMirror-overlayscroll-horizontal div, .CodeMirror-overlayscroll-vertical div { 40 | position: absolute; 41 | background: #bcd; 42 | border-radius: 3px; 43 | } 44 | 45 | .CodeMirror-overlayscroll-horizontal, .CodeMirror-overlayscroll-vertical { 46 | position: absolute; 47 | z-index: 6; 48 | } 49 | 50 | .CodeMirror-overlayscroll-horizontal { 51 | bottom: 0; left: 0; 52 | height: 6px; 53 | } 54 | .CodeMirror-overlayscroll-horizontal div { 55 | bottom: 0; 56 | height: 100%; 57 | } 58 | 59 | .CodeMirror-overlayscroll-vertical { 60 | right: 0; top: 0; 61 | width: 6px; 62 | } 63 | .CodeMirror-overlayscroll-vertical div { 64 | right: 0; 65 | width: 100%; 66 | } 67 | -------------------------------------------------------------------------------- /app/my_module.js: -------------------------------------------------------------------------------- 1 | var pl; 2 | (function( pl ) { 3 | // Name of the module 4 | var name = "my_module"; 5 | // Object with the set of predicates, indexed by indicators (name/arity) 6 | var predicates = function() { 7 | return { 8 | "test/2": [new pl.type.Rule(new pl.type.Term("test", 9 | [new pl.type.Var("A"),new pl.type.Var("Svar") 10 | ]), new pl.type.Term(";", 11 | [new pl.type.Term("->", 12 | [new pl.type.Term(",", 13 | [new pl.type.Term("<", 14 | [new pl.type.Var("A"),new pl.type.Num(1, false) 15 | ]),new pl.type.Term("=", 16 | [new pl.type.Var("Svar"),new pl.type.Term("litet", 17 | []) 18 | ]) 19 | ]),new pl.type.Term("true", 20 | []) 21 | ]),new pl.type.Term(";", 22 | [new pl.type.Term("->", 23 | [new pl.type.Term("=", 24 | [new pl.type.Var("Svar"),new pl.type.Term("stort", 25 | []) 26 | ]),new pl.type.Term("true", 27 | []) 28 | ]),new pl.type.Term("false", 29 | []) 30 | ]) 31 | ])) 32 | ] 33 | }; 34 | }; 35 | // List of predicates exported by the module 36 | var exports = [ 37 | "test/2" 38 | ]; 39 | // DON'T EDIT 40 | if( typeof module !== 'undefined' ) { 41 | module.exports = function(tau_prolog) { 42 | pl = tau_prolog; 43 | new pl.type.Module( name, predicates(), exports ); 44 | }; 45 | } else { 46 | new pl.type.Module( name, predicates(), exports ); 47 | } 48 | })( pl ); 49 | -------------------------------------------------------------------------------- /lib/Slickgrid/slick.formatters.js: -------------------------------------------------------------------------------- 1 | /*** 2 | * Contains basic SlickGrid formatters. 3 | * 4 | * NOTE: These are merely examples. You will most likely need to implement something more 5 | * robust/extensible/localizable/etc. for your use! 6 | * 7 | * @module Formatters 8 | * @namespace Slick 9 | */ 10 | 11 | (function ($) { 12 | function PercentCompleteFormatter(row, cell, value, columnDef, dataContext) { 13 | if (value == null || value === "") { 14 | return "-"; 15 | } else if (value < 50) { 16 | return "" + value + "%"; 17 | } else { 18 | return "" + value + "%"; 19 | } 20 | } 21 | 22 | function PercentCompleteBarFormatter(row, cell, value, columnDef, dataContext) { 23 | if (value == null || value === "") { 24 | return ""; 25 | } 26 | 27 | var color; 28 | 29 | if (value < 30) { 30 | color = "red"; 31 | } else if (value < 70) { 32 | color = "silver"; 33 | } else { 34 | color = "green"; 35 | } 36 | 37 | return ""; 38 | } 39 | 40 | function YesNoFormatter(row, cell, value, columnDef, dataContext) { 41 | return value ? "Yes" : "No"; 42 | } 43 | 44 | function CheckboxFormatter(row, cell, value, columnDef, dataContext) { 45 | return ''; 46 | } 47 | 48 | function CheckmarkFormatter(row, cell, value, columnDef, dataContext) { 49 | return value ? "" : ""; 50 | } 51 | 52 | // exports 53 | $.extend(true, window, { 54 | "Slick": { 55 | "Formatters": { 56 | "PercentComplete": PercentCompleteFormatter, 57 | "PercentCompleteBar": PercentCompleteBarFormatter, 58 | "YesNo": YesNoFormatter, 59 | "Checkmark": CheckmarkFormatter, 60 | "Checkbox": CheckboxFormatter 61 | 62 | } 63 | } 64 | }); 65 | })(jQuery); 66 | -------------------------------------------------------------------------------- /lib/Slickgrid/Plugins/slick.cellrangedecorator.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | // register namespace 3 | $.extend(true, window, { 4 | "Slick": { 5 | "CellRangeDecorator": CellRangeDecorator 6 | } 7 | }); 8 | 9 | /*** 10 | * Displays an overlay on top of a given cell range. 11 | * 12 | * TODO: 13 | * Currently, it blocks mouse events to DOM nodes behind it. 14 | * Use FF and WebKit-specific "pointer-events" CSS style, or some kind of event forwarding. 15 | * Could also construct the borders separately using 4 individual DIVs. 16 | * 17 | * @param {Grid} grid 18 | * @param {Object} options 19 | */ 20 | function CellRangeDecorator(grid, options) { 21 | var _elem; 22 | var _defaults = { 23 | selectionCssClass: 'slick-range-decorator', 24 | selectionCss: { 25 | "zIndex": "9999", 26 | "border": "2px dashed red" 27 | }, 28 | offset: { 29 | top: -1, 30 | left: -1, 31 | height: -2, 32 | width: -2 33 | } 34 | }; 35 | 36 | options = $.extend(true, {}, _defaults, options); 37 | 38 | 39 | function show(range) { 40 | if (!_elem) { 41 | _elem = $("
", {css: options.selectionCss}) 42 | .addClass(options.selectionCssClass) 43 | .css("position", "absolute") 44 | .appendTo(grid.getActiveCanvasNode()); 45 | } 46 | 47 | var from = grid.getCellNodeBox(range.fromRow, range.fromCell); 48 | var to = grid.getCellNodeBox(range.toRow, range.toCell); 49 | 50 | if (from && to && options && options.offset) { 51 | _elem.css({ 52 | top: from.top + options.offset.top, 53 | left: from.left + options.offset.left, 54 | height: to.bottom - from.top + options.offset.height, 55 | width: to.right - from.left + options.offset.width 56 | }); 57 | } 58 | 59 | return _elem; 60 | } 61 | 62 | function destroy() { 63 | hide(); 64 | } 65 | 66 | function hide() { 67 | if (_elem) { 68 | _elem.remove(); 69 | _elem = null; 70 | } 71 | } 72 | 73 | $.extend(this, { 74 | "pluginName": "CellRangeDecorator", 75 | "show": show, 76 | "hide": hide, 77 | "destroy": destroy 78 | }); 79 | } 80 | })(jQuery); 81 | -------------------------------------------------------------------------------- /lib/jquery.fancytree.contextMenu.wwwendt.js: -------------------------------------------------------------------------------- 1 | /**! 2 | * jquery.fancytree.contextmenu.js 3 | * 4 | * Integrate the 'jQuery contextMenu' plugin as Fancytree extension: 5 | * https://github.com/swisnl/jQuery-contextMenu 6 | * 7 | * Copyright (c) 2008-2018, Martin Wendt (https://wwWendt.de) 8 | * Released under the MIT license 9 | * https://github.com/mar10/fancytree/wiki/LicenseInfo 10 | */ 11 | (function($, document) { 12 | "use strict"; 13 | 14 | var initContextMenu = function(tree, selector, menu, actions) { 15 | tree.$container.on("mousedown.contextMenu", function(event) { 16 | var node = $.ui.fancytree.getNode(event); 17 | 18 | if (node) { 19 | $.contextMenu("destroy", "." + selector); 20 | 21 | // node.setFocus(true); 22 | node.setActive(true); 23 | 24 | $.contextMenu({ 25 | selector: "." + selector, 26 | events: { 27 | show: function(options) { 28 | options.prevKeyboard = tree.options.keyboard; 29 | tree.options.keyboard = false; 30 | }, 31 | hide: function(options) { 32 | tree.options.keyboard = options.prevKeyboard; 33 | node.setFocus(true); 34 | }, 35 | }, 36 | build: function($trigger, e) { 37 | node = $.ui.fancytree.getNode($trigger); 38 | 39 | var menuItems = {}; 40 | if ($.isFunction(menu)) { 41 | menuItems = menu(node); 42 | } else if ($.isPlainObject(menu)) { 43 | menuItems = menu; 44 | } 45 | 46 | return { 47 | callback: function(action, options) { 48 | if ($.isFunction(actions)) { 49 | actions(node, action, options); 50 | } else if ($.isPlainObject(actions)) { 51 | if ( 52 | actions.hasOwnProperty(action) && 53 | $.isFunction(actions[action]) 54 | ) { 55 | actions[action](node, options); 56 | } 57 | } 58 | }, 59 | items: menuItems, 60 | }; 61 | }, 62 | }); 63 | } 64 | }); 65 | }; 66 | 67 | $.ui.fancytree.registerExtension({ 68 | name: "contextMenu", 69 | version: "@VERSION", 70 | contextMenu: { 71 | selector: "fancytree-title", 72 | menu: {}, 73 | actions: {}, 74 | }, 75 | treeInit: function(ctx) { 76 | this._superApply(arguments); 77 | initContextMenu( 78 | ctx.tree, 79 | ctx.options.contextMenu.selector || "fancytree-title", 80 | ctx.options.contextMenu.menu, 81 | ctx.options.contextMenu.actions 82 | ); 83 | }, 84 | }); 85 | })(jQuery, document); -------------------------------------------------------------------------------- /lib/codemirror/addon/placeholder/placeholder.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | CodeMirror.defineOption("placeholder", "", function(cm, val, old) { 13 | var prev = old && old != CodeMirror.Init; 14 | if (val && !prev) { 15 | cm.on("blur", onBlur); 16 | cm.on("change", onChange); 17 | cm.on("swapDoc", onChange); 18 | onChange(cm); 19 | } else if (!val && prev) { 20 | cm.off("blur", onBlur); 21 | cm.off("change", onChange); 22 | cm.off("swapDoc", onChange); 23 | clearPlaceholder(cm); 24 | var wrapper = cm.getWrapperElement(); 25 | wrapper.className = wrapper.className.replace(" CodeMirror-empty", ""); 26 | } 27 | 28 | if (val && !cm.hasFocus()) onBlur(cm); 29 | }); 30 | 31 | function clearPlaceholder(cm) { 32 | if (cm.state.placeholder) { 33 | cm.state.placeholder.parentNode.removeChild(cm.state.placeholder); 34 | cm.state.placeholder = null; 35 | } 36 | } 37 | function setPlaceholder(cm) { 38 | clearPlaceholder(cm); 39 | var elt = cm.state.placeholder = document.createElement("pre"); 40 | elt.style.cssText = "height: 0; overflow: visible"; 41 | elt.style.direction = cm.getOption("direction"); 42 | elt.className = "CodeMirror-placeholder"; 43 | var placeHolder = cm.getOption("placeholder") 44 | if (typeof placeHolder == "string") placeHolder = document.createTextNode(placeHolder) 45 | elt.appendChild(placeHolder) 46 | cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild); 47 | } 48 | 49 | function onBlur(cm) { 50 | if (isEmpty(cm)) setPlaceholder(cm); 51 | } 52 | function onChange(cm) { 53 | var wrapper = cm.getWrapperElement(), empty = isEmpty(cm); 54 | wrapper.className = wrapper.className.replace(" CodeMirror-empty", "") + (empty ? " CodeMirror-empty" : ""); 55 | 56 | if (empty) setPlaceholder(cm); 57 | else clearPlaceholder(cm); 58 | } 59 | 60 | function isEmpty(cm) { 61 | return (cm.lineCount() === 1) && (cm.getLine(0) === ""); 62 | } 63 | }); 64 | -------------------------------------------------------------------------------- /lib/contextMenu/jquery.fancytree.contextMenu.js: -------------------------------------------------------------------------------- 1 | /**! 2 | * jquery.fancytree.contextmenu.js 3 | * 4 | * Integrate the 'jQuery contextMenu' plugin as Fancytree extension: 5 | * https://github.com/swisnl/jQuery-contextMenu 6 | * 7 | * Copyright (c) 2008-2018, Martin Wendt (https://wwWendt.de) 8 | * Released under the MIT license 9 | * https://github.com/mar10/fancytree/wiki/LicenseInfo 10 | */ 11 | (function($, document) { 12 | "use strict"; 13 | 14 | var initContextMenu = function(tree, selector, menu, actions) { 15 | tree.$container.on("mousedown.contextMenu", function(event) { 16 | var node = $.ui.fancytree.getNode(event); 17 | 18 | if (node) { 19 | $.contextMenu("destroy", "." + selector); 20 | 21 | // node.setFocus(true); 22 | node.setActive(true); 23 | 24 | $.contextMenu({ 25 | selector: "." + selector, 26 | events: { 27 | show: function(options) { 28 | options.prevKeyboard = tree.options.keyboard; 29 | tree.options.keyboard = false; 30 | }, 31 | hide: function(options) { 32 | tree.options.keyboard = options.prevKeyboard; 33 | node.setFocus(true); 34 | }, 35 | }, 36 | build: function($trigger, e) { 37 | node = $.ui.fancytree.getNode($trigger); 38 | 39 | var menuItems = {}; 40 | if ($.isFunction(menu)) { 41 | menuItems = menu(node); 42 | } else if ($.isPlainObject(menu)) { 43 | menuItems = menu; 44 | } 45 | 46 | return { 47 | callback: function(action, options) { 48 | if ($.isFunction(actions)) { 49 | actions(node, action, options); 50 | } else if ($.isPlainObject(actions)) { 51 | if ( 52 | actions.hasOwnProperty(action) && 53 | $.isFunction(actions[action]) 54 | ) { 55 | actions[action](node, options); 56 | } 57 | } 58 | }, 59 | items: menuItems, 60 | }; 61 | }, 62 | }); 63 | } 64 | }); 65 | }; 66 | 67 | $.ui.fancytree.registerExtension({ 68 | name: "contextMenu", 69 | version: "@VERSION", 70 | contextMenu: { 71 | selector: "fancytree-title", 72 | menu: {}, 73 | actions: {}, 74 | }, 75 | treeInit: function(ctx) { 76 | this._superApply(arguments); 77 | initContextMenu( 78 | ctx.tree, 79 | ctx.options.contextMenu.selector || "fancytree-title", 80 | ctx.options.contextMenu.menu, 81 | ctx.options.contextMenu.actions 82 | ); 83 | }, 84 | }); 85 | })(jQuery, document); 86 | -------------------------------------------------------------------------------- /lib/contextMenu/jquery.fancytree.contextMenuold.js: -------------------------------------------------------------------------------- 1 | /**! 2 | * jquery.fancytree.contextmenu.js 3 | * 4 | * Integrate the 'jQuery contextMenu' plugin as Fancytree extension: 5 | * https://github.com/swisnl/jQuery-contextMenu 6 | * 7 | * Copyright (c) 2008-2018, Martin Wendt (https://wwWendt.de) 8 | * Released under the MIT license 9 | * https://github.com/mar10/fancytree/wiki/LicenseInfo 10 | */ 11 | (function($, document) { 12 | "use strict"; 13 | 14 | var initContextMenu = function(tree, selector, menu, actions) { 15 | tree.$container.on("mousedown.contextMenu", function(event) { 16 | var node = $.ui.fancytree.getNode(event); 17 | 18 | if (node) { 19 | $.contextMenu("destroy", "." + selector); 20 | 21 | // node.setFocus(true); 22 | node.setActive(true); 23 | 24 | $.contextMenu({ 25 | selector: "." + selector, 26 | events: { 27 | show: function(options) { 28 | options.prevKeyboard = tree.options.keyboard; 29 | tree.options.keyboard = false; 30 | }, 31 | hide: function(options) { 32 | tree.options.keyboard = options.prevKeyboard; 33 | node.setFocus(true); 34 | }, 35 | }, 36 | build: function($trigger, e) { 37 | node = $.ui.fancytree.getNode($trigger); 38 | 39 | var menuItems = {}; 40 | if ($.isFunction(menu)) { 41 | menuItems = menu(node); 42 | } else if ($.isPlainObject(menu)) { 43 | menuItems = menu; 44 | } 45 | 46 | return { 47 | callback: function(action, options) { 48 | if ($.isFunction(actions)) { 49 | actions(node, action, options); 50 | } else if ($.isPlainObject(actions)) { 51 | if ( 52 | actions.hasOwnProperty(action) && 53 | $.isFunction(actions[action]) 54 | ) { 55 | actions[action](node, options); 56 | } 57 | } 58 | }, 59 | items: menuItems, 60 | }; 61 | }, 62 | }); 63 | } 64 | }); 65 | }; 66 | 67 | $.ui.fancytree.registerExtension({ 68 | name: "contextMenu", 69 | version: "@VERSION", 70 | contextMenu: { 71 | selector: "fancytree-title", 72 | menu: {}, 73 | actions: {}, 74 | }, 75 | treeInit: function(ctx) { 76 | this._superApply(arguments); 77 | initContextMenu( 78 | ctx.tree, 79 | ctx.options.contextMenu.selector || "fancytree-title", 80 | ctx.options.contextMenu.menu, 81 | ctx.options.contextMenu.actions 82 | ); 83 | }, 84 | }); 85 | })(jQuery, document); -------------------------------------------------------------------------------- /lib/jquery.fancytree.contextMenu.js: -------------------------------------------------------------------------------- 1 | /**! 2 | * jquery.fancytree.contextmenu.js 3 | * 4 | * Integrate the 'jQuery contextMenu' plugin as Fancytree extension: 5 | * https://github.com/swisnl/jQuery-contextMenu 6 | * 7 | * Copyright (c) 2008-2018, Martin Wendt (https://wwWendt.de) 8 | * Released under the MIT license 9 | * https://github.com/mar10/fancytree/wiki/LicenseInfo 10 | */ 11 | (function ($, document) { 12 | "use strict"; 13 | 14 | var initContextMenu = function (tree, selector, menu, actions) { 15 | tree.$container.on("mousedown.contextMenu", function (event) { 16 | var node = $.ui.fancytree.getNode(event); 17 | 18 | if (node) { 19 | $.contextMenu("destroy", "." + selector); 20 | 21 | // node.setFocus(true); 22 | node.setActive(true); 23 | 24 | $.contextMenu({ 25 | selector: "." + selector, 26 | events: { 27 | show: function (options) { 28 | options.prevKeyboard = tree.options.keyboard; 29 | tree.options.keyboard = false; 30 | }, 31 | hide: function (options) { 32 | tree.options.keyboard = options.prevKeyboard; 33 | node.setFocus(true); 34 | }, 35 | }, 36 | build: function ($trigger, e) { 37 | node = $.ui.fancytree.getNode($trigger); 38 | 39 | var menuItems = {}; 40 | if ($.isFunction(menu)) { 41 | menuItems = menu(node); 42 | } else if ($.isPlainObject(menu)) { 43 | menuItems = menu; 44 | } 45 | 46 | return { 47 | callback: function (action, options) { 48 | if ($.isFunction(actions)) { 49 | actions(node, action, options); 50 | } else if ($.isPlainObject(actions)) { 51 | if ( 52 | Object.prototype.hasOwnProperty.call( 53 | actions, 54 | action 55 | ) && 56 | $.isFunction(actions[action]) 57 | ) { 58 | actions[action](node, options); 59 | } 60 | } 61 | }, 62 | items: menuItems, 63 | }; 64 | }, 65 | }); 66 | } 67 | }); 68 | }; 69 | 70 | $.ui.fancytree.registerExtension({ 71 | name: "contextMenu", 72 | version: "@VERSION", 73 | contextMenu: { 74 | selector: "fancytree-title", 75 | menu: {}, 76 | actions: {}, 77 | }, 78 | treeInit: function (ctx) { 79 | this._superApply(arguments); 80 | initContextMenu( 81 | ctx.tree, 82 | ctx.options.contextMenu.selector || "fancytree-title", 83 | ctx.options.contextMenu.menu, 84 | ctx.options.contextMenu.actions 85 | ); 86 | }, 87 | }); 88 | })(jQuery, document); 89 | -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-themeroller/ui.fancytree.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Fancytree "ThemeRoller" skin. 3 | * This file should be included after a jQuery Themeroller style sheet. 4 | * It is meant to be used together with the ext-themeroller extension. 5 | * 6 | * DON'T EDIT THE CSS FILE DIRECTLY, since it is automatically generated from 7 | * the LESS templates. 8 | */ 9 | 10 | // Import common styles 11 | @import "../skin-common.less"; 12 | 13 | 14 | /******************************************************************************* 15 | * Styles specific to this skin. 16 | * 17 | * This section is automatically generated from the `ui-fancytree.less` template. 18 | ******************************************************************************/ 19 | 20 | 21 | // Override the variable after the import. 22 | // NOTE: Variables are always resolved as the last definition, even if it is 23 | // after where it is used. 24 | @fancy-use-sprites: true; // false: suppress all background images (i.e. icons) 25 | 26 | @fancy-line-height: 20px; // height of a nodes selection bar including borders 27 | @fancy-node-v-spacing: 0px; // gap between two node borders 28 | @fancy-icon-width: 16px; 29 | @fancy-icon-height: 16px; 30 | @fancy-icon-spacing: 3px; // margin between icon/icon or icon/title 31 | @fancy-icon-ofs-top: 2px; // extra vertical offset for expander, checkbox and icon 32 | @fancy-title-ofs-top: 0px; // extra vertical offset for title 33 | @fancy-node-border-width: 1px; 34 | @fancy-node-border-radius: 0px; 35 | @fancy-node-outline-width: 1px; 36 | 37 | 38 | // We need to define this variable here (not in skin-common.less) to make it 39 | // work with grunt and webpack: 40 | @fancy-image-prefix: "./skin-themeroller/"; 41 | 42 | // Use 'data-uri(...)' to embed the image into CSS instead of linking to 'loading.gif': 43 | // @fancy-loading-url: data-uri("@{fancy-image-prefix}loading.gif"); 44 | // Set to `true` to use `data-uri(...)` which will embed icons.gif into CSS 45 | // instead of linking to that file: 46 | // @fancy-inline-sprites: true; 47 | 48 | /******************************************************************************* 49 | * Node titles 50 | */ 51 | .fancytree-plain { 52 | span.fancytree-node { 53 | border: @fancy-node-border-width solid transparent; // avoid jumping, when a border is added on hover 54 | } 55 | } 56 | 57 | /******************************************************************************* 58 | * 'table' extension 59 | */ 60 | table.fancytree-ext-table tbody { 61 | tr td { 62 | border: 1px solid transparent; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /app/MatchConnector.js: -------------------------------------------------------------------------------- 1 | var MatchConnector = fabric.util.createClass(fabric.Line, { 2 | type: 'matchConnector', 3 | 4 | initialize(element, options) { 5 | options || (options = {}); 6 | this.callSuper('initialize', element, options); 7 | 8 | // Set default options 9 | this.set({ 10 | hasBorders: false, 11 | hasControls: false, 12 | stroke: '#00a8f0', 13 | perPixelTargetFind: true, 14 | strokeWidth: 2, 15 | selectable: false, 16 | padding: 5 17 | }); 18 | 19 | this.role = "preview"; // mode when dragging-to-create 20 | this.setRole("true"); 21 | 22 | this.on('mousedown', function(options){ 23 | if(options.button === 1) { 24 | app.view.markSelectedConnection(this); 25 | // console.log("left click"); 26 | } 27 | if(options.button === 3) { 28 | // console.log("right click"); 29 | 30 | // toggle connection "role" between "true" and "false" 31 | // find connectionmodel 32 | var model = app.view.pageModel; 33 | var connModel = model.connections.find(conn=>conn.id == this.id); 34 | if(connModel.role == "true") 35 | connModel.role = "false"; 36 | else 37 | connModel.role = "true"; 38 | 39 | this.setRole(connModel.role); 40 | 41 | this.redraw(); 42 | 43 | options.e.preventDefault(); 44 | options.e.stopPropagation(); 45 | } 46 | }); 47 | }, 48 | 49 | // styling is changed according to role 50 | setRole: function(role){ 51 | if(this.role != role){ 52 | var newColor = null; 53 | var dash = null; 54 | 55 | this.role = role; 56 | if(this.role == "true"){ 57 | newColor = '#00a8f0'; 58 | dash = null; 59 | } 60 | else if(this.role == "false"){ 61 | // "false" 62 | newColor = '#ff5555'; 63 | dash = [5, 5]; 64 | } 65 | else { 66 | // assume "preview" 67 | newColor = 'gray'; 68 | dash = [5, 5]; 69 | } 70 | 71 | this.set({ 72 | strokeDashArray: dash, 73 | stroke: newColor 74 | }) 75 | this.redraw(); 76 | } 77 | }, 78 | 79 | // redraw, for whatever reason 80 | redraw: function(){ 81 | this.set({ 82 | 'x2':this.source.left-1, 83 | 'y2':this.source.top-1, 84 | 'x1':this.target.left-1, 85 | 'y1':this.target.top-1 86 | }); 87 | this.setCoords(); 88 | 89 | // make sure the involved ports are at the top 90 | app.view.canvas.bringToFront(this.source); 91 | app.view.canvas.bringToFront(this.target); 92 | 93 | } 94 | 95 | }); -------------------------------------------------------------------------------- /app/Shapes/StraightConnector.js: -------------------------------------------------------------------------------- 1 | var StraightConnector = fabric.util.createClass(fabric.Line, { 2 | type: 'straightConnector', 3 | 4 | initialize(element, options) { 5 | options || (options = {}); 6 | this.callSuper('initialize', element, options); 7 | 8 | // Set default options 9 | this.set({ 10 | hasBorders: false, 11 | hasControls: false, 12 | stroke: '#00a8f0', 13 | perPixelTargetFind: true, 14 | strokeWidth: 2, 15 | selectable: false, 16 | padding: 5 17 | }); 18 | 19 | this.role = "preview"; // mode when dragging-to-create 20 | this.setRole("true"); 21 | 22 | this.on('mousedown', function(options){ 23 | if(options.button === 1) { 24 | app.view.markSelectedConnection(this); 25 | // console.log("left click"); 26 | } 27 | if(options.button === 3) { 28 | // console.log("right click"); 29 | 30 | // toggle connection "role" between "true" and "false" 31 | // find connectionmodel 32 | var model = app.view.pageModel; 33 | var connModel = model.connections.find(conn=>conn.id == this.id); 34 | if(connModel.role == "true") 35 | connModel.role = "false"; 36 | else 37 | connModel.role = "true"; 38 | 39 | this.setRole(connModel.role); 40 | 41 | this.redraw(); 42 | 43 | options.e.preventDefault(); 44 | options.e.stopPropagation(); 45 | } 46 | }); 47 | }, 48 | 49 | // styling is changed according to role 50 | setRole: function(role){ 51 | if(this.role != role){ 52 | var newColor = null; 53 | var dash = null; 54 | 55 | this.role = role; 56 | if(this.role == "true"){ 57 | newColor = '#00a8f0'; 58 | dash = null; 59 | } 60 | else if(this.role == "false"){ 61 | // "false" 62 | newColor = '#ff5555'; 63 | dash = [5, 5]; 64 | } 65 | else { 66 | // assume "preview" 67 | newColor = 'gray'; 68 | dash = [5, 5]; 69 | } 70 | 71 | this.set({ 72 | strokeDashArray: dash, 73 | stroke: newColor 74 | }) 75 | this.redraw(); 76 | } 77 | }, 78 | 79 | // redraw, for whatever reason 80 | redraw: function(){ 81 | this.set({ 82 | 'x2':this.source.left-1, 83 | 'y2':this.source.top-1, 84 | 'x1':this.target.left-1, 85 | 'y1':this.target.top-1 86 | }); 87 | this.setCoords(); 88 | 89 | // make sure the involved ports are at the top 90 | app.view.canvas.bringToFront(this.source); 91 | app.view.canvas.bringToFront(this.target); 92 | 93 | } 94 | 95 | }); -------------------------------------------------------------------------------- /lib/Slickgrid/Plugins/slick.cellcopymanager.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | // register namespace 3 | $.extend(true, window, { 4 | "Slick": { 5 | "CellCopyManager": CellCopyManager 6 | } 7 | }); 8 | 9 | 10 | function CellCopyManager() { 11 | var _grid; 12 | var _self = this; 13 | var _copiedRanges; 14 | 15 | function init(grid) { 16 | _grid = grid; 17 | _grid.onKeyDown.subscribe(handleKeyDown); 18 | } 19 | 20 | function destroy() { 21 | _grid.onKeyDown.unsubscribe(handleKeyDown); 22 | } 23 | 24 | function handleKeyDown(e, args) { 25 | var ranges; 26 | if (!_grid.getEditorLock().isActive()) { 27 | if (e.which == Slick.keyCode.ESCAPE) { 28 | if (_copiedRanges) { 29 | e.preventDefault(); 30 | clearCopySelection(); 31 | _self.onCopyCancelled.notify({ranges: _copiedRanges}); 32 | _copiedRanges = null; 33 | } 34 | } 35 | 36 | if (e.which == 67 && (e.ctrlKey || e.metaKey)) { 37 | ranges = _grid.getSelectionModel().getSelectedRanges(); 38 | if (ranges.length !== 0) { 39 | e.preventDefault(); 40 | _copiedRanges = ranges; 41 | markCopySelection(ranges); 42 | _self.onCopyCells.notify({ranges: ranges}); 43 | } 44 | } 45 | 46 | if (e.which == 86 && (e.ctrlKey || e.metaKey)) { 47 | if (_copiedRanges) { 48 | e.preventDefault(); 49 | ranges = _grid.getSelectionModel().getSelectedRanges(); 50 | _self.onPasteCells.notify({from: _copiedRanges, to: ranges}); 51 | if (!_grid.getOptions().preserveCopiedSelectionOnPaste) { 52 | clearCopySelection(); 53 | _copiedRanges = null; 54 | } 55 | } 56 | } 57 | } 58 | } 59 | 60 | function markCopySelection(ranges) { 61 | var columns = _grid.getColumns(); 62 | var hash = {}; 63 | for (var i = 0; i < ranges.length; i++) { 64 | for (var j = ranges[i].fromRow; j <= ranges[i].toRow; j++) { 65 | hash[j] = {}; 66 | for (var k = ranges[i].fromCell; k <= ranges[i].toCell; k++) { 67 | hash[j][columns[k].id] = "copied"; 68 | } 69 | } 70 | } 71 | _grid.setCellCssStyles("copy-manager", hash); 72 | } 73 | 74 | function clearCopySelection() { 75 | _grid.removeCellCssStyles("copy-manager"); 76 | } 77 | 78 | $.extend(this, { 79 | "init": init, 80 | "destroy": destroy, 81 | "pluginName": "CellCopyManager", 82 | 83 | "clearCopySelection": clearCopySelection, 84 | 85 | "onCopyCells": new Slick.Event(), 86 | "onCopyCancelled": new Slick.Event(), 87 | "onPasteCells": new Slick.Event() 88 | }); 89 | } 90 | })(jQuery); 91 | -------------------------------------------------------------------------------- /lib/Slickgrid/Plugins/slick.autotooltips.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | // Register namespace 3 | $.extend(true, window, { 4 | "Slick": { 5 | "AutoTooltips": AutoTooltips 6 | } 7 | }); 8 | 9 | /** 10 | * AutoTooltips plugin to show/hide tooltips when columns are too narrow to fit content. 11 | * @constructor 12 | * @param {boolean} [options.enableForCells=true] - Enable tooltip for grid cells 13 | * @param {boolean} [options.enableForHeaderCells=false] - Enable tooltip for header cells 14 | * @param {number} [options.maxToolTipLength=null] - The maximum length for a tooltip 15 | */ 16 | function AutoTooltips(options) { 17 | var _grid; 18 | var _self = this; 19 | var _defaults = { 20 | enableForCells: true, 21 | enableForHeaderCells: false, 22 | maxToolTipLength: null, 23 | replaceExisting: true 24 | }; 25 | 26 | /** 27 | * Initialize plugin. 28 | */ 29 | function init(grid) { 30 | options = $.extend(true, {}, _defaults, options); 31 | _grid = grid; 32 | if (options.enableForCells) _grid.onMouseEnter.subscribe(handleMouseEnter); 33 | if (options.enableForHeaderCells) _grid.onHeaderMouseEnter.subscribe(handleHeaderMouseEnter); 34 | } 35 | 36 | /** 37 | * Destroy plugin. 38 | */ 39 | function destroy() { 40 | if (options.enableForCells) _grid.onMouseEnter.unsubscribe(handleMouseEnter); 41 | if (options.enableForHeaderCells) _grid.onHeaderMouseEnter.unsubscribe(handleHeaderMouseEnter); 42 | } 43 | 44 | /** 45 | * Handle mouse entering grid cell to add/remove tooltip. 46 | * @param {jQuery.Event} e - The event 47 | */ 48 | function handleMouseEnter(e) { 49 | var cell = _grid.getCellFromEvent(e); 50 | if (cell) { 51 | var $node = $(_grid.getCellNode(cell.row, cell.cell)); 52 | var text; 53 | if (!$node.attr("title") || options.replaceExisting) { 54 | if ($node.innerWidth() < $node[0].scrollWidth) { 55 | text = $.trim($node.text()); 56 | if (options.maxToolTipLength && text.length > options.maxToolTipLength) { 57 | text = text.substr(0, options.maxToolTipLength - 3) + "..."; 58 | } 59 | } else { 60 | text = ""; 61 | } 62 | $node.attr("title", text); 63 | } 64 | $node = null; 65 | } 66 | } 67 | 68 | /** 69 | * Handle mouse entering header cell to add/remove tooltip. 70 | * @param {jQuery.Event} e - The event 71 | * @param {object} args.column - The column definition 72 | */ 73 | function handleHeaderMouseEnter(e, args) { 74 | var column = args.column, 75 | $node = $(e.target).closest(".slick-header-column"); 76 | if (column && !column.toolTip) { 77 | $node.attr("title", ($node.innerWidth() < $node[0].scrollWidth) ? column.name : ""); 78 | } 79 | $node = null; 80 | } 81 | 82 | // Public API 83 | $.extend(this, { 84 | "init": init, 85 | "destroy": destroy, 86 | "pluginName": "AutoTooltips" 87 | }); 88 | } 89 | })(jQuery); -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-lion/ui.fancytree.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Fancytree "Lion" skin. 3 | * 4 | * DON'T EDIT THE CSS FILE DIRECTLY, since it is automatically generated from 5 | * the LESS templates. 6 | */ 7 | 8 | /* 9 | Lion colors: 10 | gray highlight bar: #D4D4D4 11 | blue highlight-bar and -border #3875D7 12 | 13 | */ 14 | // Import common styles 15 | @import "../skin-common.less"; 16 | 17 | 18 | /******************************************************************************* 19 | * Styles specific to this skin. 20 | * 21 | * This section is automatically generated from the `ui-fancytree.less` template. 22 | ******************************************************************************/ 23 | 24 | // Override the variable after the import. 25 | // NOTE: Variables are always resolved as the last definition, even if it is 26 | // after where it is used. 27 | @fancy-use-sprites: true; // false: suppress all background images (i.e. icons) 28 | 29 | @fancy-icon-width: 16px; 30 | @fancy-icon-height: 16px; 31 | @fancy-line-height: 16px; 32 | @fancy-icon-spacing: 3px; 33 | 34 | // We need to define this variable here (not in skin-common.less) to make it 35 | // work with grunt and webpack: 36 | @fancy-image-prefix: "./skin-lion/"; 37 | 38 | // Use 'data-uri(...)' to embed the image into CSS instead of linking to 'loading.gif': 39 | // @fancy-loading-url: data-uri("@{fancy-image-prefix}loading.gif"); 40 | // Set to `true` to use `data-uri(...)` which will embed icons.gif into CSS 41 | // instead of linking to that file: 42 | // @fancy-inline-sprites: true; 43 | 44 | 45 | /******************************************************************************* 46 | * Node titles 47 | */ 48 | span.fancytree-title { 49 | border: 1px solid transparent; // reserve some space for status borders 50 | border-radius: 0; 51 | } 52 | span.fancytree-focused span.fancytree-title { 53 | outline: 1px dotted black; 54 | } 55 | span.fancytree-selected span.fancytree-title, 56 | span.fancytree-active span.fancytree-title { 57 | background-color: #D4D4D4; // gray 58 | } 59 | span.fancytree-selected span.fancytree-title { 60 | font-style: italic; 61 | } 62 | .fancytree-treefocus span.fancytree-selected span.fancytree-title, 63 | .fancytree-treefocus span.fancytree-active span.fancytree-title { 64 | color: white; 65 | background-color: #3875D7; // blue 66 | } 67 | 68 | /******************************************************************************* 69 | * 'table' extension 70 | */ 71 | table.fancytree-ext-table { 72 | border-collapse: collapse; 73 | tbody { 74 | tr.fancytree-focused { 75 | background-color: #99DEFD; 76 | } 77 | tr.fancytree-active { 78 | background-color: royalblue; 79 | } 80 | tr.fancytree-selected { 81 | background-color: #99DEFD; 82 | } 83 | } 84 | } 85 | 86 | /******************************************************************************* 87 | * 'columnview' extension 88 | */ 89 | 90 | table.fancytree-ext-columnview tbody tr td { 91 | border: 1px solid gray; 92 | } 93 | table.fancytree-ext-columnview span.fancytree-node.fancytree-expanded { 94 | background-color: #ccc; 95 | } 96 | table.fancytree-ext-columnview span.fancytree-node.fancytree-active { 97 | background-color: royalblue; 98 | } 99 | -------------------------------------------------------------------------------- /lib/Slickgrid/slick-default-theme.css: -------------------------------------------------------------------------------- 1 | /* 2 | IMPORTANT: 3 | In order to preserve the uniform grid appearance, all cell styles need to have padding, margin and border sizes. 4 | No built-in (selected, editable, highlight, flashing, invalid, loading, :focus) or user-specified CSS 5 | classes should alter those! 6 | */ 7 | 8 | .slick-header-columns { 9 | background: url('images/header-columns-bg.gif') repeat-x center bottom; 10 | border-bottom: 1px solid silver; 11 | } 12 | 13 | .slick-header-column { 14 | background: url('images/header-columns-bg.gif') repeat-x center bottom; 15 | border-right: 1px solid silver; 16 | } 17 | 18 | .slick-header-column:hover, .slick-header-column-active { 19 | background: white url('images/header-columns-over-bg.gif') repeat-x center bottom; 20 | } 21 | 22 | .slick-headerrow { 23 | background: #fafafa; 24 | } 25 | 26 | .slick-headerrow-column { 27 | background: #fafafa; 28 | border-bottom: 0; 29 | height: 100%; 30 | } 31 | 32 | .slick-preheader-panel { 33 | border: 1px solid #d3d3d3; 34 | } 35 | 36 | .slick-row.ui-state-active { 37 | background: #F5F7D7; 38 | } 39 | 40 | .slick-row { 41 | position: absolute; 42 | background: white; 43 | border: 0px; 44 | /* line-height: 20px; */ 45 | } 46 | 47 | .slick-row.selected { 48 | z-index: 10; 49 | background: #DFE8F6; 50 | } 51 | 52 | .slick-cell { 53 | padding-left: 4px; 54 | padding-right: 4px; 55 | } 56 | 57 | .slick-group { 58 | border-bottom: 2px solid silver; 59 | } 60 | 61 | .slick-group-toggle { 62 | width: 9px; 63 | height: 9px; 64 | margin-right: 5px; 65 | } 66 | 67 | .slick-group-toggle.expanded { 68 | background: url(images/collapse.gif) no-repeat center center; 69 | } 70 | 71 | .slick-group-toggle.collapsed { 72 | background: url(images/expand.gif) no-repeat center center; 73 | } 74 | 75 | .slick-group-totals { 76 | color: gray; 77 | background: white; 78 | } 79 | 80 | .slick-group-select-checkbox { 81 | width: 13px; 82 | height: 13px; 83 | margin: 3px 10px 0 0; 84 | display: inline-block; 85 | } 86 | .slick-group-select-checkbox.checked { 87 | background: url(images/GrpCheckboxY.png) no-repeat center center; 88 | } 89 | 90 | .slick-group-select-checkbox.unchecked { 91 | background: url(images/GrpCheckboxN.png) no-repeat center center; 92 | } 93 | 94 | .slick-cell.selected { 95 | background-color: beige; 96 | } 97 | 98 | .slick-cell.active { 99 | border-color: gray; 100 | border-style: solid; 101 | } 102 | 103 | .slick-sortable-placeholder { 104 | background: #d9d9d9 !important; 105 | } 106 | 107 | .slick-row.odd { 108 | background: #fafafa; 109 | } 110 | 111 | .slick-row.ui-state-active { 112 | background: #F5F7D7; 113 | } 114 | 115 | .slick-row.loading { 116 | opacity: 0.5; 117 | filter: alpha(opacity = 50); 118 | } 119 | 120 | .slick-cell.invalid { 121 | border-color: red; 122 | -moz-animation-duration: 0.2s; 123 | -webkit-animation-duration: 0.2s; 124 | -moz-animation-name: slickgrid-invalid-hilite; 125 | -webkit-animation-name: slickgrid-invalid-hilite; 126 | } 127 | 128 | @-moz-keyframes slickgrid-invalid-hilite { 129 | from { box-shadow: 0 0 6px red; } 130 | to { box-shadow: none; } 131 | } 132 | 133 | @-webkit-keyframes slickgrid-invalid-hilite { 134 | from { box-shadow: 0 0 6px red; } 135 | to { box-shadow: none; } 136 | } -------------------------------------------------------------------------------- /css/styles.less: -------------------------------------------------------------------------------- 1 | @import "configuration.less"; 2 | 3 | 4 | * { 5 | -webkit-box-sizing: border-box; 6 | -moz-box-sizing: border-box; 7 | box-sizing: border-box; 8 | } 9 | 10 | body { 11 | overflow: hidden; 12 | font-family: 'Lato', sans-serif !important; 13 | font-weight: 300; 14 | padding: 0px; 15 | margin: 0px; 16 | border: 0px; 17 | background-color: #f9f9f9; 18 | color: #212121; 19 | -webkit-font-smoothing: antialiased; 20 | overflow: hidden; 21 | -webkit-text-size-adjust: 100%; 22 | text-rendering: optimizeLegibility; 23 | } 24 | 25 | #canvas { 26 | padding: 0px; 27 | margin: 0px; 28 | border: 0px; 29 | position: absolute; 30 | top: @toolbarHeight; 31 | right: @propertiesWidth; 32 | left: 290px; 33 | bottom: 0px; 34 | overflow: scroll; 35 | background-color: transparent; 36 | } 37 | 38 | #toolbar { 39 | position: absolute; 40 | margin: 0px; 41 | padding-top: 10px; 42 | padding-left: 20px; 43 | top: 0px; 44 | left: 160px; 45 | height: @toolbarHeight; 46 | right: 0px; 47 | overflow: hidden; 48 | z-index: 1000; 49 | background-color: #3f51b5; 50 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26); 51 | } 52 | 53 | #toolbar_hint { 54 | position: absolute; 55 | top: 19px; 56 | height: @toolbarHeight; 57 | right: 40px; 58 | color: white; 59 | opacity:0.5; 60 | } 61 | 62 | #toolbar_hint a{ 63 | color: white; 64 | } 65 | #propertyPane { 66 | border-right: 1px solid #e0e0e0; 67 | bottom: 0; 68 | background: #fff; 69 | color: #333; 70 | display: block; 71 | font-family: 'RobotoDraft', sans-serif; 72 | position: fixed; 73 | right: 0px; 74 | top: @toolbarHeight; 75 | width: @propertiesWidth; 76 | z-index: 4; 77 | } 78 | 79 | #propertyHeader{ 80 | color: #3f51b5; 81 | font-size: 24px; 82 | font-weight: 400; 83 | line-height: 32px; 84 | overflow: hidden; 85 | padding: 10px; 86 | font-family: "RobotoDraft",sans-serif; 87 | margin: 0; 88 | margin-bottom: 30px; 89 | text-rendering: optimizelegibility; 90 | } 91 | 92 | #logo { 93 | display: block; 94 | margin: auto; 95 | padding: 12px 24px 10px 24px; 96 | position: fixed; 97 | left: 0; 98 | top: 0; 99 | height: @toolbarHeight; 100 | width: 160px; 101 | font-size: 30px; 102 | font-weight: 100; 103 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26); 104 | z-index: 1000; 105 | 106 | } 107 | 108 | .panel{ 109 | border-left: 5px solid #3f51b5; 110 | padding-left:15px; 111 | margin-bottom:30px; 112 | } 113 | 114 | .panel-heading{ 115 | font-size: 15px; 116 | line-height: 32px; 117 | color: #212121; 118 | font-family: "RobotoDraft",sans-serif; 119 | font-weight: bold; 120 | margin: 0; 121 | text-rendering: optimizelegibility; 122 | } 123 | 124 | input.form-control{ 125 | border: 1px solid gray; 126 | border-radius: 6px; 127 | height: 30px; 128 | margin-left: 10px; 129 | margin-top: 5px; 130 | padding-left: 5px; 131 | } 132 | 133 | 134 | .gray:active { 135 | border: 1px solid #c6c6c4; 136 | color: #222; 137 | -webkit-box-shadow: inset 0 0 2px 4px #f1f1f1, 0 1px 0 0 #eeeeee; 138 | -moz-box-shadow: inset 0 0 2px 4px #f1f1f1, 0 1px 0 0 #eeeeee; 139 | box-shadow: inset 0 0 2px 4px #f1f1f1, 0 1px 0 0 #eeeeee; 140 | } 141 | 142 | .disabled { 143 | cursor: default !important; 144 | color: #888 !important; 145 | opacity: 0.8; 146 | } -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-vista/ui.fancytree.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Fancytree "Vista" skin. 3 | * 4 | * DON'T EDIT THE CSS FILE DIRECTLY, since it is automatically generated from 5 | * the LESS templates. 6 | */ 7 | 8 | /* 9 | both: 10 | unselected background: #FCFCFC 'nearly white' 11 | hover bar (unselected, inactive): #F8FCFE..#EFF9FE (border: #D8F0FA) 'very light blue' 12 | active node: #F6FBFD..#D5EFFC (border: #99DEFD) 'light blue' 13 | active node with hover: #F2F9FD..#C4E8FA (border: #B6E6FB) 14 | 15 | Tree view: 16 | active node, tree inactive: #FAFAFB..#E5E5E5 (border: #D9D9D9) 'light gray, selected, but tree not active' 17 | 18 | List view: 19 | selected bar: --> active bar 20 | focus bar: active + border 1px dotted #090402 (inside the blue border) 21 | 22 | table left/right border: #EDEDED 'light gray' 23 | */ 24 | 25 | // Import common styles 26 | @import "../skin-common.less"; 27 | 28 | 29 | /******************************************************************************* 30 | * Styles specific to this skin. 31 | * 32 | * This section is automatically generated from the `ui-fancytree.less` template. 33 | ******************************************************************************/ 34 | 35 | 36 | // Override the variable after the import. 37 | // NOTE: Variables are always resolved as the last definition, even if it is 38 | // after where it is used. 39 | @fancy-use-sprites: true; // false: suppress all background images (i.e. icons) 40 | 41 | @fancy-icon-width: 16px; 42 | @fancy-icon-height: 16px; 43 | @fancy-line-height: 16px; 44 | @fancy-icon-spacing: 3px; 45 | 46 | // We need to define this variable here (not in skin-common.less) to make it 47 | // work with grunt and webpack: 48 | @fancy-image-prefix: "./skin-vista/"; 49 | 50 | // Use 'data-uri(...)' to embed the image into CSS instead of linking to 'loading.gif': 51 | // @fancy-loading-url: data-uri("@{fancy-image-prefix}loading.gif"); 52 | // Set to `true` to use `data-uri(...)` which will embed icons.gif into CSS 53 | // instead of linking to that file: 54 | // @fancy-inline-sprites: true; 55 | 56 | 57 | /******************************************************************************* 58 | * Node titles 59 | */ 60 | span.fancytree-title { 61 | border: @fancy-node-border-width solid transparent; // avoid jumping, when a border is added on hover 62 | } 63 | span.fancytree-title:hover { 64 | background-color: #F2F7FD; // light blue 65 | border-color: #B8D6FB; // darker light blue 66 | } 67 | .fancytree-folder span.fancytree-title { 68 | // font-weight: bold; 69 | } 70 | span.fancytree-focused span.fancytree-title { 71 | background-color: #EFEBDE; // gray 72 | outline: 1px dotted gray; 73 | } 74 | span.fancytree-has-children span.fancytree-title { 75 | // font-style: oblique; 76 | } 77 | span.fancytree-expanded span.fancytree-title { 78 | } 79 | span.fancytree-selected span.fancytree-title { 80 | font-style: italic; 81 | } 82 | span.fancytree-active span.fancytree-title { 83 | border: 1px solid #99DEFD; 84 | background-color: #D8F0FA; 85 | } 86 | 87 | /******************************************************************************* 88 | * 'table' extension 89 | */ 90 | 91 | table.fancytree-ext-table { 92 | border-collapse: collapse; 93 | tbody tr.fancytree-focused { 94 | background-color: #99DEFD; 95 | } 96 | tbody tr.fancytree-active { 97 | background-color: royalblue; 98 | } 99 | tbody tr.fancytree-selected { 100 | background-color: #99FDDE; 101 | } 102 | } 103 | 104 | /******************************************************************************* 105 | * 'columnview' extension 106 | */ 107 | 108 | table.fancytree-ext-columnview { 109 | span.fancytree-node.fancytree-expanded { 110 | background-color: #ccc; 111 | } 112 | span.fancytree-node.fancytree-active { 113 | background-color: royalblue; 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /css/slickgrid.css: -------------------------------------------------------------------------------- 1 | /* 2 | IMPORTANT: 3 | In order to preserve the uniform grid appearance, all cell styles need to have padding, margin and border sizes. 4 | No built-in (selected, editable, highlight, flashing, invalid, loading, :focus) or user-specified CSS 5 | classes should alter those! 6 | */ 7 | 8 | .slick-header.ui-state-default, .slick-headerrow.ui-state-default { 9 | width: 100%; 10 | overflow: hidden; 11 | border-left: 0px; 12 | } 13 | 14 | .slick-header-columns, .slick-headerrow-columns { 15 | position: relative; 16 | white-space: nowrap; 17 | cursor: default; 18 | overflow: hidden; 19 | } 20 | 21 | .slick-header-column.ui-state-default { 22 | position: relative; 23 | display: inline-block; 24 | overflow: hidden; 25 | -o-text-overflow: ellipsis; 26 | text-overflow: ellipsis; 27 | height: 16px; 28 | line-height: 16px; 29 | margin: 0; 30 | padding: 4px; 31 | border-right: 1px solid silver; 32 | border-left: 0px; 33 | border-top: 0px; 34 | border-bottom: 0px; 35 | float: left; 36 | } 37 | 38 | .slick-headerrow-column.ui-state-default { 39 | padding: 4px; 40 | } 41 | 42 | .slick-header-column-sorted { 43 | font-style: italic; 44 | } 45 | 46 | .slick-sort-indicator { 47 | display: inline-block; 48 | width: 8px; 49 | height: 5px; 50 | margin-left: 4px; 51 | margin-top: 6px; 52 | float: left; 53 | } 54 | 55 | .slick-sort-indicator-desc { 56 | background: url(images/sort-desc.gif); 57 | } 58 | 59 | .slick-sort-indicator-asc { 60 | background: url(images/sort-asc.gif); 61 | } 62 | 63 | .slick-resizable-handle { 64 | position: absolute; 65 | font-size: 0.1px; 66 | display: block; 67 | cursor: col-resize; 68 | width: 4px; 69 | right: 0px; 70 | top: 0; 71 | height: 100%; 72 | } 73 | 74 | .slick-sortable-placeholder { 75 | background: silver; 76 | } 77 | 78 | .grid-canvas { 79 | position: relative; 80 | outline: 0; 81 | } 82 | 83 | .slick-row.ui-widget-content, .slick-row.ui-state-active { 84 | position: absolute; 85 | border: 0px; 86 | width: 100%; 87 | } 88 | 89 | .slick-cell, .slick-headerrow-column { 90 | position: absolute; 91 | border: 1px solid transparent; 92 | border-right: 1px dotted silver; 93 | border-bottom-color: silver; 94 | overflow: hidden; 95 | -o-text-overflow: ellipsis; 96 | text-overflow: ellipsis; 97 | vertical-align: middle; 98 | z-index: 1; 99 | padding: 1px 2px 2px 1px; 100 | margin: 0; 101 | white-space: nowrap; 102 | cursor: default; 103 | } 104 | 105 | .slick-group { 106 | } 107 | 108 | .slick-group-toggle { 109 | display: inline-block; 110 | } 111 | 112 | .slick-cell.highlighted { 113 | background: lightskyblue; 114 | background: rgba(0, 0, 255, 0.2); 115 | -webkit-transition: all 0.5s; 116 | -moz-transition: all 0.5s; 117 | -o-transition: all 0.5s; 118 | transition: all 0.5s; 119 | } 120 | 121 | .slick-cell.flashing { 122 | border: 1px solid red !important; 123 | } 124 | 125 | .slick-cell.editable { 126 | z-index: 11; 127 | overflow: visible; 128 | background: white; 129 | border-color: black; 130 | border-style: solid; 131 | } 132 | 133 | .slick-cell:focus { 134 | outline: none; 135 | } 136 | 137 | .slick-reorder-proxy { 138 | display: inline-block; 139 | background: blue; 140 | opacity: 0.15; 141 | filter: alpha(opacity = 15); 142 | cursor: move; 143 | } 144 | 145 | .slick-reorder-guide { 146 | display: inline-block; 147 | height: 2px; 148 | background: blue; 149 | opacity: 0.7; 150 | filter: alpha(opacity = 70); 151 | } 152 | 153 | .slick-selection { 154 | z-index: 10; 155 | position: absolute; 156 | border: 2px dashed black; 157 | } 158 | -------------------------------------------------------------------------------- /lib/fancytree_dist/modules/jquery.fancytree.multi.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jquery.fancytree.multi.js 3 | * 4 | * Allow multiple selection of nodes by mouse or keyboard. 5 | * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) 6 | * 7 | * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) 8 | * 9 | * Released under the MIT license 10 | * https://github.com/mar10/fancytree/wiki/LicenseInfo 11 | * 12 | * @version 2.37.0 13 | * @date 2020-09-11T18:58:08Z 14 | */ 15 | 16 | (function(factory) { 17 | if (typeof define === "function" && define.amd) { 18 | // AMD. Register as an anonymous module. 19 | define(["jquery", "./jquery.fancytree"], factory); 20 | } else if (typeof module === "object" && module.exports) { 21 | // Node/CommonJS 22 | require("./jquery.fancytree"); 23 | module.exports = factory(require("jquery")); 24 | } else { 25 | // Browser globals 26 | factory(jQuery); 27 | } 28 | })(function($) { 29 | "use strict"; 30 | 31 | /******************************************************************************* 32 | * Private functions and variables 33 | */ 34 | 35 | // var isMac = /Mac/.test(navigator.platform); 36 | 37 | /******************************************************************************* 38 | * Extension code 39 | */ 40 | $.ui.fancytree.registerExtension({ 41 | name: "multi", 42 | version: "2.37.0", 43 | // Default options for this extension. 44 | options: { 45 | allowNoSelect: false, // 46 | mode: "sameParent", // 47 | // Events: 48 | // beforeSelect: $.noop // Return false to prevent cancel/save (data.input is available) 49 | }, 50 | 51 | treeInit: function(ctx) { 52 | this._superApply(arguments); 53 | this.$container.addClass("fancytree-ext-multi"); 54 | if (ctx.options.selectMode === 1) { 55 | $.error( 56 | "Fancytree ext-multi: selectMode: 1 (single) is not compatible." 57 | ); 58 | } 59 | }, 60 | nodeClick: function(ctx) { 61 | var //pluginOpts = ctx.options.multi, 62 | tree = ctx.tree, 63 | node = ctx.node, 64 | activeNode = tree.getActiveNode() || tree.getFirstChild(), 65 | isCbClick = ctx.targetType === "checkbox", 66 | isExpanderClick = ctx.targetType === "expander", 67 | eventStr = $.ui.fancytree.eventToString(ctx.originalEvent); 68 | 69 | switch (eventStr) { 70 | case "click": 71 | if (isExpanderClick) { 72 | break; 73 | } // Default handler will expand/collapse 74 | if (!isCbClick) { 75 | tree.selectAll(false); 76 | // Select clicked node (radio-button mode) 77 | node.setSelected(); 78 | } 79 | // Default handler will toggle checkbox clicks and activate 80 | break; 81 | case "shift+click": 82 | // node.debug("click") 83 | tree.visitRows( 84 | function(n) { 85 | // n.debug("click2", n===node, node) 86 | n.setSelected(); 87 | if (n === node) { 88 | return false; 89 | } 90 | }, 91 | { 92 | start: activeNode, 93 | reverse: activeNode.isBelowOf(node), 94 | } 95 | ); 96 | break; 97 | case "ctrl+click": 98 | case "meta+click": // Mac: [Command] 99 | node.toggleSelected(); 100 | return; 101 | } 102 | return this._superApply(arguments); 103 | }, 104 | nodeKeydown: function(ctx) { 105 | var tree = ctx.tree, 106 | node = ctx.node, 107 | event = ctx.originalEvent, 108 | eventStr = $.ui.fancytree.eventToString(event); 109 | 110 | switch (eventStr) { 111 | case "up": 112 | case "down": 113 | tree.selectAll(false); 114 | node.navigate(event.which, true); 115 | tree.getActiveNode().setSelected(); 116 | break; 117 | case "shift+up": 118 | case "shift+down": 119 | node.navigate(event.which, true); 120 | tree.getActiveNode().setSelected(); 121 | break; 122 | } 123 | return this._superApply(arguments); 124 | }, 125 | }); 126 | // Value returned by `require('jquery.fancytree..')` 127 | return $.ui.fancytree; 128 | }); // End of closure 129 | -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-awesome/ui.fancytree.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Fancytree "awesome" skin. 3 | * 4 | * DON'T EDIT THE CSS FILE DIRECTLY, since it is automatically generated from 5 | * the LESS templates. 6 | */ 7 | 8 | // Import common styles 9 | @import "../skin-common.less"; 10 | 11 | // We need to define this variable here (not in skin-common.less) to make it 12 | // work with grunt and webpack: 13 | @fancy-image-prefix: "./skin-awesome/"; 14 | 15 | 16 | /******************************************************************************* 17 | * Styles specific to this skin. 18 | * 19 | * This section is automatically generated from the `ui-fancytree.less` template. 20 | ******************************************************************************/ 21 | 22 | @fancy-use-sprites: false; // false: suppress all background images (i.e. icons) 23 | @fancy-loading-url: none; 24 | 25 | @fancy-cst-size: 10pt; 26 | 27 | @fancy-level-indent: @fancy-cst-size; //@fancy-cst-size; 28 | @fancy-line-height: @fancy-cst-size; // height of a nodes selection bar including borders 29 | @fancy-node-v-spacing: 1px; // gap between two node borders 30 | @fancy-icon-width: @fancy-cst-size; 31 | @fancy-icon-height: @fancy-cst-size; 32 | @fancy-icon-spacing: 3px; // margin between icon/icon or icon/title 33 | @fancy-icon-ofs-top: 0px; // extra vertical offset for expander, checkbox and icon 34 | @fancy-title-ofs-top: 0px; // extra vertical offset for title 35 | @fancy-node-border-width: 1px; 36 | @fancy-node-border-radius: 0px; 37 | @fancy-node-outline-width: 1px; 38 | 39 | // @fancy-loading-url: data-uri("@{fancy-image-prefix}loading.gif"); 40 | 41 | // Set to `true` to use `data-uri(...)` instead of a `url(...)` link: 42 | @fancy-inline-sprites: false; 43 | 44 | @fancy-font-size: @fancy-cst-size; 45 | @fancy-font-family: tahoma, arial, helvetica; 46 | @fancy-font-color: #000; 47 | @fancy-font-color-dimm: silver; 48 | @fancy-font-error-color: red; 49 | 50 | 51 | ul.fancytree-container ul 52 | { 53 | padding: 0.3em 0 0 1em; 54 | margin: 0; 55 | } 56 | 57 | 58 | // The standard CSS assumes span.icon, but Fontawesome may use SVG or SPAN 59 | .fancytree-expander, 60 | .fancytree-checkbox, 61 | .fancytree-icon { 62 | min-width: @fancy-icon-width; 63 | text-align: center; 64 | } 65 | svg.fancytree-checkbox, // span... is already defined in skin-common-less 66 | svg.fancytree-icon { 67 | padding-left: @fancy-icon-spacing; 68 | } 69 | 70 | /******************************************************************************* 71 | * Node titles 72 | */ 73 | span.fancytree-title { 74 | border: 1px solid transparent; // reserve some space for status borders 75 | border-radius: 0; 76 | } 77 | span.fancytree-focused span.fancytree-title { 78 | outline: 1px dotted black; 79 | } 80 | // span.fancytree-selected span.fancytree-title, 81 | span.fancytree-active span.fancytree-title { 82 | background-color: #D4D4D4; // gray 83 | } 84 | // span.fancytree-selected span.fancytree-title { 85 | // font-style: italic; 86 | // } 87 | // .fancytree-treefocus span.fancytree-selected span.fancytree-title, 88 | .fancytree-treefocus span.fancytree-active span.fancytree-title { 89 | color: white; 90 | background-color: #3875D7; // blue 91 | } 92 | 93 | // .fancytree-treefocus span.fancytree-selected span.fancytree-title{ 94 | // color: white; 95 | // background-color: #99DEFD; // blue 96 | // } 97 | 98 | /******************************************************************************* 99 | * 'table' extension 100 | */ 101 | table.fancytree-ext-table { 102 | border-collapse: collapse; 103 | tbody { 104 | tr.fancytree-focused { 105 | background-color: #99DEFD; 106 | } 107 | tr.fancytree-active { 108 | background-color: royalblue; 109 | } 110 | // tr.fancytree-selected { 111 | // background-color: #99DEFD; 112 | // } 113 | } 114 | } 115 | 116 | /******************************************************************************* 117 | * 'columnview' extension 118 | */ 119 | 120 | table.fancytree-ext-columnview tbody tr td { 121 | border: 1px solid gray; 122 | } 123 | table.fancytree-ext-columnview span.fancytree-node.fancytree-expanded { 124 | background-color: #ccc; 125 | } 126 | table.fancytree-ext-columnview span.fancytree-node.fancytree-active { 127 | background-color: royalblue; 128 | } 129 | -------------------------------------------------------------------------------- /lib/Class.exec.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Simple JavaScript Inheritance 3 | * By John Resig http://ejohn.org/ 4 | * MIT Licensed. 5 | * 6 | ****************************************************** 7 | * Example Usage 8 | ****************************************************** 9 | var Person = Class.extend({ 10 | init: function(isDancing){ 11 | this.dancing = isDancing; 12 | }, 13 | dance: function(){ 14 | return this.dancing; 15 | } 16 | }); 17 | 18 | var Ninja = Person.extend({ 19 | init: function(){ 20 | this._super( false ); 21 | }, 22 | dance: function(){ 23 | // Call the inherited version of dance() 24 | return this._super(); 25 | }, 26 | swingSword: function(){ 27 | return true; 28 | } 29 | }); 30 | 31 | var p = new Person(true); 32 | p.dance(); // => true 33 | 34 | var n = new Ninja(); 35 | n.dance(); // => false 36 | n.swingSword(); // => true 37 | 38 | // Should all be true 39 | p instanceof Person && p instanceof Class && 40 | n instanceof Ninja && n instanceof Person && n instanceof Class 41 | 42 | ****************************************************** 43 | */ 44 | 45 | // Inspired by base2 and Prototype 46 | (function(){ 47 | var fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/; 48 | 49 | // The base Class implementation (does nothing) 50 | this.Class = function(){}; 51 | 52 | 53 | // Create a new Class that inherits from this class 54 | Class.extend = function(prop) { 55 | var _super = this.prototype; 56 | 57 | // Instantiate a base class (but only create the instance, 58 | // don't run the init constructor) 59 | initializing = true; 60 | var prototype = new this(); 61 | initializing = false; 62 | 63 | 64 | // Copy the properties over onto the new prototype 65 | for (var name in prop) { 66 | // Check if we're overwriting an existing function 67 | prototype[name] = typeof prop[name] == "function" && 68 | typeof _super[name] == "function" && fnTest.test(prop[name]) ? 69 | (function(name, fn){ 70 | return function() { 71 | var tmp = this._super; 72 | 73 | // Add a new ._super() method that is the same method 74 | // but on the super-class 75 | this._super = _super[name]; 76 | 77 | // The method only need to be bound temporarily, so we 78 | // remove it when we're done executing 79 | var ret = fn.apply(this, arguments); 80 | this._super = tmp; 81 | 82 | return ret; 83 | }; 84 | })(name, prop[name]) : 85 | prop[name]; 86 | } 87 | 88 | // The dummy class constructor 89 | function Class() { 90 | // All construction is actually done in the init method 91 | if ( !initializing && this.init ) 92 | this.init.apply(this, arguments); 93 | } 94 | 95 | // Populate our constructed prototype object 96 | Class.prototype = prototype; 97 | 98 | // Enforce the constructor to be what we expect 99 | Class.prototype.constructor = Class; 100 | 101 | // And make this class extendable 102 | Class.extend = arguments.callee; 103 | 104 | // EXTENSION BY Draw2D.org to inject methods into an existing class to provide plugins or 105 | // bugfixes for further releases 106 | // 107 | Class.inject = function (prop) { 108 | var proto = this.prototype; 109 | var parent = {}; 110 | for (var name in prop) { 111 | if (typeof (prop[name]) == "function" && typeof (proto[name]) == "function" && fnTest.test(prop[name])) { 112 | parent[name] = proto[name]; 113 | proto[name] = (function (name, fn) { 114 | return function () { 115 | var tmp = this.parent; 116 | this.parent = parent[name]; 117 | var ret = fn.apply(this, arguments); 118 | this.parent = tmp; 119 | return ret; 120 | }; 121 | })(name, prop[name]); 122 | } else { 123 | proto[name] = prop[name]; 124 | } 125 | } 126 | }; 127 | 128 | return Class; 129 | }; 130 | })(); 131 | 132 | -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-material/ui.fancytree.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Fancytree "material" skin. 3 | * 4 | * DON'T EDIT THE CSS FILE DIRECTLY, since it is automatically generated from 5 | * the LESS templates. 6 | */ 7 | 8 | // Import common styles 9 | @import "../skin-common.less"; 10 | 11 | // We need to define this variable here (not in skin-common.less) to make it 12 | // work with grunt and webpack: 13 | @fancy-image-prefix: "./skin-material/"; 14 | 15 | /******************************************************************************* 16 | * Styles specific to this skin. 17 | * 18 | * This section is automatically generated from the `ui-fancytree.less` template. 19 | ******************************************************************************/ 20 | /* 21 | https://material.io/guidelines/components/data-tables.html#data-tables-structure 22 | */ 23 | // local vars 24 | @fancy-cst-size: 24px; 25 | @fancy-cst-primary-color: #3f51b5; // primary app color (of indigo-pink) 26 | @fancy-cst-secondary-color: #ff4081; // secondary app color (of indigo-pink): checkbox 27 | @fancy-cst-black-87: #212121; // 87% black: table content 28 | @fancy-cst-black-54: #757575; // 54% black: column headers 29 | @fancy-cst-select-bg: #f5f5f5; // Grey 100: selected row backround 30 | @fancy-cst-hover-bg: #eeeeee; // Grey 200: hovered row backround 31 | 32 | // Override the variable after the import. 33 | // NOTE: Variables are always resolved as the last definition, even if it is 34 | // after where it is used. 35 | @fancy-use-sprites: false; // false: suppress all background images (i.e. icons) 36 | @fancy-loading-url: none; 37 | 38 | @fancy-level-indent: @fancy-cst-size; //@fancy-cst-size; 39 | @fancy-line-height: @fancy-cst-size; // height of a nodes selection bar including borders 40 | @fancy-node-v-spacing: 1px; // gap between two node borders 41 | @fancy-icon-width: @fancy-cst-size; 42 | @fancy-icon-height: @fancy-cst-size; 43 | @fancy-icon-spacing: 3px; // margin between icon/icon or icon/title 44 | @fancy-icon-ofs-top: 0px; // extra vertical offset for expander, checkbox and icon 45 | @fancy-title-ofs-top: 0px; // extra vertical offset for title 46 | @fancy-node-border-width: 1px; 47 | @fancy-node-border-radius: 0px; 48 | @fancy-node-outline-width: 1px; 49 | 50 | // @fancy-loading-url: data-uri("@{fancy-image-prefix}loading.gif"); 51 | 52 | // Set to `true` to use `data-uri(...)` instead of a `url(...)` link: 53 | @fancy-inline-sprites: false; 54 | 55 | @fancy-font-size: @fancy-cst-size; 56 | @fancy-font-family: "Roboto Regular", tahoma, arial, helvetica; 57 | @fancy-font-color: @fancy-cst-black-87; 58 | @fancy-font-color-dimm: silver; 59 | @fancy-font-error-color: red; 60 | 61 | 62 | ul.fancytree-container ul 63 | { 64 | padding: 0.3em 0 0 1em; 65 | margin: 0; 66 | font-size: @fancy-cst-size; 67 | color: @fancy-cst-black-87; 68 | } 69 | 70 | ul.fancytree-container span.fancytree-icon.material-icons 71 | { 72 | // font-size: @fancy-cst-size; 73 | // color: @fancy-cst-black-87; 74 | } 75 | 76 | 77 | /******************************************************************************* 78 | * Node titles 79 | */ 80 | 81 | .fancytree-plain { 82 | span.fancytree-selected span.fancytree-title { 83 | background-color: @fancy-cst-select-bg; 84 | } 85 | span.fancytree-selected span.fancytree-title:hover, 86 | span.fancytree-active span.fancytree-title { 87 | background-color: @fancy-cst-hover-bg; 88 | } 89 | } 90 | 91 | .fancytree-container span.fancytree-checkbox { 92 | color: @fancy-cst-secondary-color; 93 | } 94 | 95 | /******************************************************************************* 96 | * 'table' extension 97 | */ 98 | table.fancytree-ext-table { 99 | border-collapse: collapse; 100 | tbody { 101 | tr.fancytree-focused, tr.fancytree-selected { 102 | background-color: @fancy-cst-select-bg; 103 | } 104 | tr.fancytree-active, tr:hover { 105 | background-color: @fancy-cst-hover-bg; 106 | } 107 | } 108 | } 109 | 110 | /******************************************************************************* 111 | * 'columnview' extension 112 | */ 113 | 114 | table.fancytree-ext-columnview tbody tr td { 115 | border: 1px solid gray; 116 | } 117 | table.fancytree-ext-columnview span.fancytree-node.fancytree-expanded { 118 | background-color: #ccc; 119 | } 120 | table.fancytree-ext-columnview span.fancytree-node.fancytree-active { 121 | background-color: royalblue; 122 | } 123 | -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-xp/ui.fancytree.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Fancytree "XP" skin. 3 | * 4 | * DON'T EDIT THE CSS FILE DIRECTLY, since it is automatically generated from 5 | * the LESS templates. 6 | */ 7 | 8 | // Import common styles 9 | @import "../skin-common.less"; 10 | 11 | 12 | /******************************************************************************* 13 | * Styles specific to this skin. 14 | * 15 | * This section is automatically generated from the `ui-fancytree.less` template. 16 | ******************************************************************************/ 17 | 18 | // Override the variable after the import. 19 | // NOTE: Variables are always resolved as the last definition, even if it is 20 | // after where it is used. 21 | @fancy-use-sprites: true; // false: suppress all background images (i.e. icons) 22 | 23 | @fancy-icon-width: 16px; 24 | @fancy-icon-height: 16px; 25 | @fancy-icon-spacing: 3px; 26 | @fancy-node-border-width: 0; 27 | 28 | // We need to define this variable here (not in skin-common.less) to make it 29 | // work with grunt and webpack: 30 | @fancy-image-prefix: "./skin-xp/"; 31 | 32 | // Use 'data-uri(...)' to embed the image into CSS instead of linking to 'loading.gif': 33 | // @fancy-loading-url: data-uri("@{fancy-image-prefix}loading.gif"); 34 | // Set to `true` to use `data-uri(...)` which will embed icons.gif into CSS 35 | // instead of linking to that file: 36 | // @fancy-inline-sprites: true; 37 | 38 | 39 | /******************************************************************************* 40 | * Tree container 41 | */ 42 | ul.fancytree-container { 43 | li { 44 | // background-image: url("vline.gif"); 45 | // Use 'data-uri(...)' to embed the image into CSS instead of linking to 'loading.gif': 46 | background-image: data-uri("@{fancy-image-prefix}vline.gif"); 47 | background-position: 0 0; 48 | } 49 | &.fancytree-rtl { 50 | li { 51 | background-position: right 0; 52 | background-image: url("@{fancy-image-prefix}vline-rtl.gif"); 53 | } 54 | .fancytree-exp-n span.fancytree-expander { 55 | background-image: url("@{fancy-image-prefix}icons-rtl.gif"); 56 | .useSprite(0, 4); 57 | } 58 | .fancytree-exp-nl span.fancytree-expander { 59 | background-image: url("@{fancy-image-prefix}icons-rtl.gif"); 60 | .useSprite(1, 4); 61 | } 62 | } 63 | // Suppress lines for last child node 64 | li.fancytree-lastsib { 65 | background-image: none; 66 | } 67 | } 68 | // Suppress lines if level is fixed expanded (option minExpandLevel) 69 | ul.fancytree-no-connector > li { 70 | background-image: none; 71 | } 72 | 73 | // XP theme always displays connectors (not only when .fancytree-connectors is set) 74 | .fancytree-exp-n span.fancytree-expander, 75 | .fancytree-exp-nl span.fancytree-expander { 76 | .setBgImageUrl("icons.gif"); 77 | // margin-top: 0; 78 | } 79 | .fancytree-exp-n span.fancytree-expander, // End-node, not last sibling 80 | .fancytree-exp-n span.fancytree-expander:hover { 81 | .useSprite(0, 4); 82 | } 83 | .fancytree-exp-nl span.fancytree-expander, // End-node, last sibling 84 | .fancytree-exp-nl span.fancytree-expander:hover { 85 | .useSprite(1, 4); 86 | } 87 | 88 | /******************************************************************************* 89 | * Node titles 90 | */ 91 | 92 | span.fancytree-title { 93 | border: @fancy-node-border-width solid transparent; // avoid jumping, when a border is added on hover 94 | } 95 | span.fancytree-title:hover { 96 | background-color: #F2F7FD; // light blue 97 | border-color: #B8D6FB; // darker light blue 98 | } 99 | span.fancytree-focused span.fancytree-title { 100 | outline: 1px dotted black; 101 | background-color: #EFEBDE; // gray 102 | } 103 | .fancytree-folder span.fancytree-title { 104 | font-weight: bold; 105 | } 106 | .fancytree-selected span.fancytree-title { 107 | color: green; 108 | font-style: italic; 109 | } 110 | .fancytree-active span.fancytree-title { 111 | background-color: #3169C6 !important; 112 | color: white !important; // @ IE6 113 | } 114 | 115 | /******************************************************************************* 116 | * 'table' extension 117 | */ 118 | table.fancytree-ext-table { 119 | border-collapse: collapse; 120 | tbody tr.fancytree-focused { 121 | background-color: #99DEFD; 122 | } 123 | tbody tr.fancytree-active { 124 | background-color: royalblue; 125 | } 126 | tbody tr.fancytree-selected { 127 | background-color: #99FDDE; 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /app/Shapes/CommentShape.js: -------------------------------------------------------------------------------- 1 | var CommentShape = fabric.util.createClass(fabric.Group, { 2 | type: 'commentShape', 3 | // initialize can be of type function(options) or function(property, options), like for text. 4 | // no other signatures allowed. 5 | initialize: function(options) { 6 | options || (options = { }); 7 | 8 | this.callSuper('initialize',[], options); 9 | this.set({ 10 | originX: 'center', 11 | originY: 'center', 12 | objectCaching: false, 13 | hasControls: true 14 | }); 15 | 16 | 17 | // TODO: when will these contained shapes be calculated? 18 | // - can we get drop-preview? (mark group border green, when we're going to drop on it) 19 | this.isDataShape = true; // all shapes should be data shapes? 20 | this.value = null; 21 | 22 | }, 23 | 24 | defaultContent: function(){ 25 | return { 26 | value: "" 27 | }; 28 | 29 | }, 30 | // gather all ports, with positions relative to the shape left/top 31 | gatherPorts: function(){ 32 | // comment shape has no ports 33 | return []; 34 | }, 35 | 36 | 37 | updateContents: function(shapeData) { 38 | 39 | // delete all the old content 40 | if(this.bg != null){ 41 | this.remove(this.value); 42 | this.remove(this.bg); 43 | } 44 | var startx = this.left; 45 | var starty = this.top; 46 | var incomingx = startx; 47 | var incomingy = starty; 48 | 49 | var maxWidth = 0; 50 | var totHeight = 0; 51 | var padding = 10; 52 | var bottomPad = 0; // extra padding after last row 53 | 54 | this.value = new fabric.Text(shapeData.value,{fontSize:11, objectCaching: false,originX: 'center', fill:'green',fontFamily:'arial'}); 55 | 56 | maxWidth = this.value.width + padding * 2; 57 | totHeight += this.value.height + padding * 2; 58 | 59 | // set minimum width 60 | if(maxWidth < 50) 61 | maxWidth = 50 62 | 63 | // place controls 64 | var top = 0; 65 | 66 | this.bg = new RoundedRect({ 67 | topLeft:[5,5], 68 | topRight : [5,5], 69 | bottomLeft: [5,5], 70 | bottomRight: [5,5], 71 | top: this.top, 72 | left: this.left, 73 | width: 30, 74 | height: 30, 75 | fill: '#000000', 76 | rx: 5, 77 | ry: 5 78 | }); 79 | var bg = this.bg; 80 | 81 | totHeight += bottomPad; 82 | 83 | // center the bg rect on midpoint 84 | bg.width = maxWidth; 85 | bg.height = totHeight; 86 | bg.left = this.left - bg.width/2; 87 | bg.top = this.top - bg.height/2; 88 | startx = bg.left; 89 | starty = bg.top; 90 | this.addWithUpdate(bg); 91 | 92 | 93 | this.value.left = startx + maxWidth/2; // - this.value.width / 2; 94 | this.value.top = starty + top + padding; 95 | this.addWithUpdate(this.value); 96 | 97 | this.left = incomingx; 98 | this.top = incomingy; 99 | }, 100 | 101 | toObject: function() { 102 | return fabric.util.object.extend(this.callSuper('toObject'), { 103 | label: this.get('label') 104 | }); 105 | }, 106 | 107 | _render: function(ctx) { 108 | this.callSuper('_render', ctx); 109 | 110 | ctx.font = '20px Helvetica'; 111 | ctx.fillStyle = '#333'; 112 | }, 113 | 114 | 115 | buildInputPanel: function(view, figure){ 116 | // bygg HTML för panel 117 | var userData = app.view.getShapeModel(figure.id).data; 118 | view.html(""); 119 | 120 | view.append('
'+ 121 | '
'+ 122 | ' Comment'+ 123 | '
'+ 124 | '
'+ 125 | '
'+ 126 | '
'+ 127 | ' ' + 128 | ' '); 129 | 130 | view.append( 131 | ' '+ 132 | '
'+ 133 | '
'+ 134 | '
'); 135 | 136 | 137 | $("#ok_button").on("click", function(){ 138 | var userData = app.view.getShapeModel(figure.id).data; 139 | 140 | userData.value = $("#comment_text").val(); 141 | 142 | figure.updateContents(userData); 143 | app.view.canvas.renderAll(); 144 | }); 145 | 146 | }, 147 | 148 | }); -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8-n/ui.fancytree.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Fancytree "win8" skin (highlighting the node span instead of title-only). 3 | * 4 | * DON'T EDIT THE CSS FILE DIRECTLY, since it is automatically generated from 5 | * the LESS templates. 6 | */ 7 | 8 | // Import common styles 9 | @import "../skin-common.less"; 10 | 11 | 12 | /******************************************************************************* 13 | * Styles specific to this skin. 14 | * 15 | * This section is automatically generated from the `ui-fancytree.less` template. 16 | ******************************************************************************/ 17 | 18 | // Borders have NO radius and NO gradients are used! 19 | 20 | // both: 21 | // unselected background: white 22 | // hover bar (unselected, inactive): #E5F3FB (border: #70C0E7) 'very light blue' 23 | // active node: #CBE8F6 (border: #26A0DA) 'light blue' 24 | // active node with hover: wie active node 25 | 26 | // Tree view: 27 | // active node, tree inactive: #F7F7F7 (border: #DEDEDE) 'light gray, selected, but tree not active' 28 | 29 | // List view: 30 | // selected bar: --> active bar 31 | // focus bar: transparent(white) + border 1px solid #3399FF () 32 | 33 | // table left/right border: #EDEDED 'light gray' 34 | 35 | // Override the variable after the import. 36 | // NOTE: Variables are always resolved as the last definition, even if it is 37 | // after where it is used. 38 | @fancy-use-sprites: true; // false: suppress all background images (i.e. icons) 39 | // Set to `true` to inline icon sprite into CSS: 40 | // @fancy-inline-sprites: true; 41 | @fancy-icon-width: 16px; 42 | @fancy-icon-height: 16px; 43 | @fancy-line-height: 16px; 44 | @fancy-icon-spacing: 3px; 45 | 46 | // We need to define this variable here (not in skin-common.less) to make it 47 | // work with grunt and webpack: 48 | @fancy-image-prefix: "./skin-win8-n/"; 49 | // Use 'data-uri(...)' to embed the image into CSS instead of linking to 'loading.gif': 50 | // @fancy-loading-url: data-uri("@{fancy-image-prefix}loading.gif"); 51 | // Set to `true` to use `data-uri(...)` which will embed icons.gif into CSS 52 | // instead of linking to that file: 53 | // @fancy-inline-sprites: true; 54 | 55 | 56 | /******************************************************************************* 57 | * Node titles 58 | */ 59 | .fancytree-plain { 60 | span.fancytree-node { 61 | border: @fancy-node-border-width solid transparent; // avoid jumping, when a border is added on hover 62 | } 63 | span.fancytree-node:hover { 64 | background-color: #E5F3FB; 65 | border-color: #70C0E7; 66 | } 67 | &.fancytree-container.fancytree-treefocus span.fancytree-node.fancytree-focused { 68 | border-color: #3399FF; 69 | // outline: 1px solid #3399FF; 70 | } 71 | span.fancytree-node.fancytree-active, 72 | span.fancytree-node.fancytree-selected { // active/selcted nodes inside inactive tree 73 | background-color: #F7F7F7; 74 | border-color: #DEDEDE; 75 | } 76 | &.fancytree-container.fancytree-treefocus span.fancytree-node.fancytree-active, 77 | &.fancytree-container.fancytree-treefocus span.fancytree-node.fancytree-selected, 78 | span.fancytree-node.fancytree-active:hover, 79 | span.fancytree-node.fancytree-selected:hover { 80 | background-color: #CBE8F6; 81 | border-color: #26A0DA; 82 | } 83 | .fancytree-node.fancytree-selected { 84 | font-style: italic; 85 | } 86 | } 87 | 88 | /******************************************************************************* 89 | * 'table' extension 90 | */ 91 | table.fancytree-ext-table tbody { 92 | tr td { 93 | border: 1px solid #EDEDED; 94 | } 95 | span.fancytree-node, 96 | span.fancytree-node:hover { // undo standard tree css 97 | border: none; 98 | background: none; 99 | } 100 | // Title gets a white background, when hovered. Undo standard node formatting 101 | // span.fancytree-title:hover { 102 | // border: none; //1px solid transparent; 103 | // background: inherit; 104 | // background: transparent; 105 | // background: none; 106 | // filter: none; 107 | // } 108 | tr:hover { 109 | background-color: #E5F3FB; 110 | outline: 1px solid #70C0E7; 111 | } 112 | // tr:hover td { 113 | // outline: 1px solid #D8F0FA; 114 | // } 115 | // tr.fancytree-focused { 116 | // border-color: #3399FF; 117 | // outline: 1px dotted black; 118 | // } 119 | tr.fancytree-focused span.fancytree-title { 120 | outline: 1px dotted black; 121 | } 122 | 123 | tr.fancytree-active:hover, 124 | tr.fancytree-selected:hover { 125 | background-color: #CBE8F6; 126 | outline: 1px solid #26A0DA; 127 | } 128 | tr.fancytree-active { // dimmed, if inside inactive tree 129 | background-color: #F7F7F7; 130 | outline: 1px solid #DEDEDE; 131 | } 132 | tr.fancytree-selected { // dimmed, if inside inactive tree 133 | background-color: #F7F7F7; 134 | } 135 | } 136 | 137 | table.fancytree-ext-table.fancytree-treefocus tbody { 138 | tr.fancytree-active { 139 | background-color: #CBE8F6; 140 | outline: 1px solid #26A0DA; 141 | } 142 | tr.fancytree-selected { 143 | background-color: #CBE8F6; 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /app/Shapes/PrologText.js: -------------------------------------------------------------------------------- 1 | prologStyles = { 2 | "Atom": {fill: 'green'}, 3 | "String": {fill: 'green'}, 4 | "Variable": {fill: 'blue'}, 5 | "Operator": {fill:'black', fontWeight: 'bold'}, 6 | "Pipe": {fill:'black', fontWeight: 'bold'}, 7 | "Comma": {fill:'black', fontWeight: 'bold'}, 8 | "FullStop": {fill:'black', fontWeight: 'bold'}, 9 | "Integer": {fill: 'red'}, 10 | "Float": {fill: 'purple'}, 11 | "BeginList":{fill:'blue', fontWeight: 'bold'}, 12 | "EndList":{fill:'blue', fontWeight: 'bold'}, 13 | "BeginParen":{fill:'blue', fontWeight: 'bold'}, 14 | "EndParen":{fill:'blue', fontWeight: 'bold'}, 15 | "Blankspace":{} 16 | } 17 | 18 | var PrologText = fabric.util.createClass(fabric.Text, { 19 | type: 'prologText', 20 | // initialize can be of type function(options) or function(property, options), like for text. 21 | // no other signatures allowed. 22 | initialize: function(text,options) { 23 | options || (options = {}); 24 | 25 | this.callSuper('initialize',text, options); 26 | this.set({ 27 | objectCaching: false, 28 | fontSize:11, 29 | fontFamily:'arial', 30 | fill:'white' 31 | }); 32 | if(options.isPreview) 33 | this.isPreview = true; 34 | else 35 | this.isPreview = false; 36 | 37 | this.setPrologText(text); 38 | }, 39 | 40 | setPrologText: function(text){ 41 | /*var lexed = this.prologLexer(text); 42 | this.set({styles:{ 43 | 0:lexed 44 | } 45 | });*/ 46 | 47 | var tokens = Lexer.GetTokens(text); 48 | var styles = this.addStyles(tokens) 49 | this.set({styles:{ 50 | 0:styles 51 | }}); 52 | 53 | if(this.isPreview){ 54 | this.set({opacity:0.5, fontStyle:'italic'}); 55 | } 56 | }, 57 | 58 | isOperator: function(c){ 59 | return "[],.-/+*:<>()\\=@.\'\"|".includes(c); 60 | }, 61 | 62 | addStyles: function(tokens){ 63 | var styles = {}; 64 | var pos = 0; 65 | tokens.forEach(token => { 66 | for(i=0;ithead tr").addClass("ui-widget-header"); 59 | $el.find(">tbody").addClass("ui-widget-conent"); 60 | } else { 61 | $el.addClass("ui-widget ui-widget-content ui-corner-all"); 62 | } 63 | 64 | $el.on("mouseenter mouseleave", ".fancytree-node", function(event) { 65 | var node = $.ui.fancytree.getNode(event.target), 66 | flag = event.type === "mouseenter"; 67 | 68 | $(node.tr ? node.tr : node.span).toggleClass( 69 | opts.hoverClass + " " + opts.addClass, 70 | flag 71 | ); 72 | }); 73 | }, 74 | treeDestroy: function(ctx) { 75 | this._superApply(arguments); 76 | ctx.widget.element.removeClass( 77 | "ui-widget ui-widget-content ui-corner-all" 78 | ); 79 | }, 80 | nodeRenderStatus: function(ctx) { 81 | var classes = {}, 82 | node = ctx.node, 83 | $el = $(node.tr ? node.tr : node.span), 84 | opts = ctx.options.themeroller; 85 | 86 | this._super(ctx); 87 | /* 88 | .ui-state-highlight: Class to be applied to highlighted or selected elements. Applies "highlight" container styles to an element and its child text, links, and icons. 89 | .ui-state-error: Class to be applied to error messaging container elements. Applies "error" container styles to an element and its child text, links, and icons. 90 | .ui-state-error-text: An additional class that applies just the error text color without background. Can be used on form labels for instance. Also applies error icon color to child icons. 91 | 92 | .ui-state-default: Class to be applied to clickable button-like elements. Applies "clickable default" container styles to an element and its child text, links, and icons. 93 | .ui-state-hover: Class to be applied on mouseover to clickable button-like elements. Applies "clickable hover" container styles to an element and its child text, links, and icons. 94 | .ui-state-focus: Class to be applied on keyboard focus to clickable button-like elements. Applies "clickable hover" container styles to an element and its child text, links, and icons. 95 | .ui-state-active: Class to be applied on mousedown to clickable button-like elements. Applies "clickable active" container styles to an element and its child text, links, and icons. 96 | */ 97 | // Set ui-state-* class (handle the case that the same class is assigned 98 | // to different states) 99 | classes[opts.activeClass] = false; 100 | classes[opts.focusClass] = false; 101 | classes[opts.selectedClass] = false; 102 | if (node.isActive()) { 103 | classes[opts.activeClass] = true; 104 | } 105 | if (node.hasFocus()) { 106 | classes[opts.focusClass] = true; 107 | } 108 | // activeClass takes precedence before selectedClass: 109 | if (node.isSelected() && !node.isActive()) { 110 | classes[opts.selectedClass] = true; 111 | } 112 | $el.toggleClass(opts.activeClass, classes[opts.activeClass]); 113 | $el.toggleClass(opts.focusClass, classes[opts.focusClass]); 114 | $el.toggleClass(opts.selectedClass, classes[opts.selectedClass]); 115 | // Additional classes (e.g. 'ui-corner-all') 116 | $el.addClass(opts.addClass); 117 | }, 118 | }); 119 | // Value returned by `require('jquery.fancytree..')` 120 | return $.ui.fancytree; 121 | }); // End of closure 122 | -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win8/ui.fancytree.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Fancytree "Win8" skin. 3 | * 4 | * DON'T EDIT THE CSS FILE DIRECTLY, since it is automatically generated from 5 | * the LESS templates. 6 | */ 7 | 8 | // Import common styles 9 | @import "../skin-common.less"; 10 | 11 | 12 | /******************************************************************************* 13 | * Styles specific to this skin. 14 | * 15 | * This section is automatically generated from the `ui-fancytree.less` template. 16 | ******************************************************************************/ 17 | 18 | // Borders have NO radius and NO gradients are used! 19 | 20 | // both: 21 | // unselected background: white 22 | // hover bar (unselected, inactive): #E5F3FB (border: #70C0E7) 'very light blue' 23 | // active node: #CBE8F6 (border: #26A0DA) 'light blue' 24 | // active node with hover: wie active node 25 | 26 | // Tree view: 27 | // active node, tree inactive: #F7F7F7 (border: #DEDEDE) 'light gray, selected, but tree not active' 28 | 29 | // List view: 30 | // selected bar: --> active bar 31 | // focus bar: transparent(white) + border 1px solid #3399FF () 32 | 33 | // table left/right border: #EDEDED 'light gray' 34 | 35 | // Override the variable after the import. 36 | // NOTE: Variables are always resolved as the last definition, even if it is 37 | // after where it is used. 38 | @fancy-use-sprites: true; // false: suppress all background images (i.e. icons) 39 | 40 | @fancy-line-height: 20px; // height of a nodes selection bar including borders 41 | @fancy-node-v-spacing: 0px; // gap between two node borders 42 | @fancy-icon-width: 16px; 43 | @fancy-icon-height: 16px; 44 | @fancy-icon-spacing: 3px; // margin between icon/icon or icon/title 45 | @fancy-icon-ofs-top: 2px; // extra vertical offset for expander, checkbox and icon 46 | @fancy-title-ofs-top: 0px; // extra vertical offset for title 47 | @fancy-node-border-width: 1px; 48 | @fancy-node-border-radius: 0px; 49 | @fancy-node-outline-width: 1px; 50 | 51 | 52 | // @fancy-icon-width: 16px; 53 | // @fancy-icon-height: 16px; 54 | // @fancy-line-height: 16px; 55 | // @fancy-icon-spacing: 3px; 56 | 57 | // We need to define this variable here (not in skin-common.less) to make it 58 | // work with grunt and webpack: 59 | @fancy-image-prefix: "./skin-win8/"; 60 | 61 | // Use 'data-uri(...)' to embed the image into CSS instead of linking to 'loading.gif': 62 | // @fancy-loading-url: data-uri("@{fancy-image-prefix}loading.gif"); 63 | // Set to `true` to use `data-uri(...)` which will embed icons.gif into CSS 64 | // instead of linking to that file: 65 | // @fancy-inline-sprites: true; 66 | 67 | /******************************************************************************* 68 | * Node titles 69 | */ 70 | .fancytree-plain { 71 | span.fancytree-title { 72 | border: @fancy-node-border-width solid transparent; // avoid jumping, when a border is added on hover 73 | } 74 | &.fancytree-container.fancytree-treefocus span.fancytree-focused span.fancytree-title { 75 | border-color: #3399ff; 76 | } 77 | span.fancytree-active span.fancytree-title, 78 | span.fancytree-selected span.fancytree-title { // active/selcted nodes inside inactive tree 79 | background-color: #f7f7f7; 80 | border-color: #dedede; 81 | } 82 | span.fancytree-node span.fancytree-selected span.fancytree-title { 83 | font-style: italic; 84 | } 85 | span.fancytree-node:hover span.fancytree-title { 86 | background-color: #eff9fe; // hover is always colored, even if tree is unfocused 87 | border-color: #70c0e7; 88 | } 89 | &.fancytree-container.fancytree-treefocus { 90 | span.fancytree-active span.fancytree-title, 91 | span.fancytree-selected span.fancytree-title { 92 | background-color: #cbe8f6; 93 | border-color: #26a0da; 94 | } 95 | } 96 | } 97 | 98 | /******************************************************************************* 99 | * 'table' extension 100 | */ 101 | table.fancytree-ext-table tbody { 102 | tr td { 103 | border: 1px solid #EDEDED; 104 | } 105 | span.fancytree-node, 106 | span.fancytree-node:hover { // undo standard tree css 107 | border: none; 108 | background: none; 109 | } 110 | // Title gets a white background, when hovered. Undo standard node formatting 111 | // span.fancytree-title:hover { 112 | // border: none; //1px solid transparent; 113 | // background: inherit; 114 | // background: transparent; 115 | // background: none; 116 | // filter: none; 117 | // } 118 | tr:hover { 119 | background-color: #E5F3FB; 120 | outline: 1px solid #70C0E7; 121 | } 122 | // tr:hover td { 123 | // outline: 1px solid #D8F0FA; 124 | // } 125 | // tr.fancytree-focused { 126 | // border-color: #3399FF; 127 | // outline: 1px dotted black; 128 | // } 129 | tr.fancytree-focused span.fancytree-title { 130 | outline: 1px dotted black; 131 | } 132 | 133 | tr.fancytree-active:hover, 134 | tr.fancytree-selected:hover { 135 | background-color: #CBE8F6; 136 | outline: 1px solid #26A0DA; 137 | } 138 | tr.fancytree-active { // dimmed, if inside inactive tree 139 | background-color: #F7F7F7; 140 | outline: 1px solid #DEDEDE; 141 | } 142 | tr.fancytree-selected { // dimmed, if inside inactive tree 143 | background-color: #F7F7F7; 144 | } 145 | } 146 | 147 | table.fancytree-ext-table.fancytree-treefocus tbody { 148 | tr.fancytree-active { 149 | background-color: #CBE8F6; 150 | outline: 1px solid #26A0DA; 151 | } 152 | tr.fancytree-selected { 153 | background-color: #CBE8F6; 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /lib/fancytree_dist/modules/jquery.fancytree.menu.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jquery.fancytree.menu.js 3 | * 4 | * Enable jQuery UI Menu as context menu for tree nodes. 5 | * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) 6 | * 7 | * @see http://api.jqueryui.com/menu/ 8 | * 9 | * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) 10 | * 11 | * Released under the MIT license 12 | * https://github.com/mar10/fancytree/wiki/LicenseInfo 13 | * 14 | * @version 2.37.0 15 | * @date 2020-09-11T18:58:08Z 16 | */ 17 | 18 | (function(factory) { 19 | if (typeof define === "function" && define.amd) { 20 | // AMD. Register as an anonymous module. 21 | define(["jquery", "./jquery.fancytree"], factory); 22 | } else if (typeof module === "object" && module.exports) { 23 | // Node/CommonJS 24 | require("./jquery.fancytree"); 25 | module.exports = factory(require("jquery")); 26 | } else { 27 | // Browser globals 28 | factory(jQuery); 29 | } 30 | })(function($) { 31 | "use strict"; 32 | 33 | $.ui.fancytree.registerExtension({ 34 | name: "menu", 35 | version: "2.37.0", 36 | // Default options for this extension. 37 | options: { 38 | enable: true, 39 | selector: null, // 40 | position: {}, // 41 | // Events: 42 | create: $.noop, // 43 | beforeOpen: $.noop, // 44 | open: $.noop, // 45 | focus: $.noop, // 46 | select: $.noop, // 47 | close: $.noop, // 48 | }, 49 | // Override virtual methods for this extension. 50 | // `this` : is this extension object 51 | // `this._base` : the Fancytree instance 52 | // `this._super`: the virtual function that was overridden (member of prev. extension or Fancytree) 53 | treeInit: function(ctx) { 54 | var opts = ctx.options, 55 | tree = ctx.tree; 56 | 57 | this._superApply(arguments); 58 | 59 | // Prepare an object that will be passed with menu events 60 | tree.ext.menu.data = { 61 | tree: tree, 62 | node: null, 63 | $menu: null, 64 | menuId: null, 65 | }; 66 | 67 | // tree.$container[0].oncontextmenu = function() {return false;}; 68 | // Replace the standard browser context menu with out own 69 | tree.$container.on("contextmenu", "span.fancytree-node", function( 70 | event 71 | ) { 72 | var node = $.ui.fancytree.getNode(event), 73 | ctx = { 74 | node: node, 75 | tree: node.tree, 76 | originalEvent: event, 77 | options: tree.options, 78 | }; 79 | tree.ext.menu._openMenu(ctx); 80 | return false; 81 | }); 82 | 83 | // Use jquery.ui.menu 84 | $(opts.menu.selector) 85 | .menu({ 86 | create: function(event, ui) { 87 | tree.ext.menu.data.$menu = $(this).menu("widget"); 88 | var data = $.extend({}, tree.ext.menu.data); 89 | opts.menu.create.call(tree, event, data); 90 | }, 91 | focus: function(event, ui) { 92 | var data = $.extend({}, tree.ext.menu.data, { 93 | menuItem: ui.item, 94 | menuId: ui.item.find(">a").attr("href"), 95 | }); 96 | opts.menu.focus.call(tree, event, data); 97 | }, 98 | select: function(event, ui) { 99 | var data = $.extend({}, tree.ext.menu.data, { 100 | menuItem: ui.item, 101 | menuId: ui.item.find(">a").attr("href"), 102 | }); 103 | if ( 104 | opts.menu.select.call(tree, event, data) !== false 105 | ) { 106 | tree.ext.menu._closeMenu(ctx); 107 | } 108 | }, 109 | }) 110 | .hide(); 111 | }, 112 | treeDestroy: function(ctx) { 113 | this._superApply(arguments); 114 | }, 115 | _openMenu: function(ctx) { 116 | var data, 117 | tree = ctx.tree, 118 | opts = ctx.options, 119 | $menu = $(opts.menu.selector); 120 | 121 | tree.ext.menu.data.node = ctx.node; 122 | data = $.extend({}, tree.ext.menu.data); 123 | 124 | if ( 125 | opts.menu.beforeOpen.call(tree, ctx.originalEvent, data) === 126 | false 127 | ) { 128 | return; 129 | } 130 | 131 | $(document) 132 | .on("keydown.fancytree", function(event) { 133 | if (event.which === $.ui.keyCode.ESCAPE) { 134 | tree.ext.menu._closeMenu(ctx); 135 | } 136 | }) 137 | .on("mousedown.fancytree", function(event) { 138 | // Close menu when clicked outside menu 139 | if ($(event.target).closest(".ui-menu-item").length === 0) { 140 | tree.ext.menu._closeMenu(ctx); 141 | } 142 | }); 143 | // $menu.position($.extend({my: "left top", at: "left bottom", of: event}, opts.menu.position)); 144 | $menu 145 | .css("position", "absolute") 146 | .show() 147 | .position({ 148 | my: "left top", 149 | at: "right top", 150 | of: ctx.originalEvent, 151 | collision: "fit", 152 | }) 153 | .focus(); 154 | 155 | opts.menu.open.call(tree, ctx.originalEvent, data); 156 | }, 157 | _closeMenu: function(ctx) { 158 | var $menu, 159 | tree = ctx.tree, 160 | opts = ctx.options, 161 | data = $.extend({}, tree.ext.menu.data); 162 | if (opts.menu.close.call(tree, ctx.originalEvent, data) === false) { 163 | return; 164 | } 165 | $menu = $(opts.menu.selector); 166 | $(document).off("keydown.fancytree, mousedown.fancytree"); 167 | $menu.hide(); 168 | tree.ext.menu.data.node = null; 169 | }, 170 | // , 171 | // nodeClick: function(ctx) { 172 | // var event = ctx.originalEvent; 173 | // if(event.which === 2 || (event.which === 1 && event.ctrlKey)){ 174 | // event.preventDefault(); 175 | // ctx.tree.ext.menu._openMenu(ctx); 176 | // return false; 177 | // } 178 | // this._superApply(arguments); 179 | // } 180 | }); 181 | // Value returned by `require('jquery.fancytree..')` 182 | return $.ui.fancytree; 183 | }); // End of closure 184 | -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-win7/ui.fancytree.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Fancytree "Win7" skin. 3 | * 4 | * DON'T EDIT THE CSS FILE DIRECTLY, since it is automatically generated from 5 | * the LESS templates. 6 | */ 7 | 8 | // Fancytree Win7 styles 9 | 10 | // both: 11 | // unselected background: #FCFCFC 'nearly white', no border 12 | // 13 | // hover bar (unselected, inactive): #fcfdfe..#EFF9FE (border: #b8d6fb) 'very light blue' 14 | // background: #f8fcfe; // 15 | // background: -moz-linear-gradient(top, #f8fcfe 0%, #eff9fe 100%); 16 | 17 | // active node: #F6FBFD..#D5EFFC (border: #719acb) 'light blue' 18 | // background: #f6fbfd; 19 | // background: -moz-linear-gradient(top, #f6fbfd 0%, #d5effc 100%); 20 | 21 | // active node with hover: #F2F9FD..#C4E8FA (border: #B6E6FB) 22 | // background: #f2f9fd; 23 | // background: -moz-linear-gradient(top, #f2f9fd 0%, #c4e8fa 100%); 24 | 25 | // Tree view: 26 | // active node, tree inactive: #FAFAFB..#E5E5E5 (border: #D9D9D9) 'light gray, selected, but tree not active' 27 | // background: #fafafb; 28 | // background: -moz-linear-gradient(top, #fafafb 0%, #e5e5e5 100%); 29 | 30 | // List view: 31 | // selected bar: --> active bar 32 | // focus bar: active + border 1px dotted #090402 (inside the blue border) 33 | 34 | // table left/right border: #EDEDED 'light gray' 35 | 36 | // Import common styles 37 | @import "../skin-common.less"; 38 | 39 | 40 | /******************************************************************************* 41 | * Styles specific to this skin. 42 | * 43 | * This section is automatically generated from the `ui-fancytree.less` template. 44 | ******************************************************************************/ 45 | 46 | // Override the variable after the import. 47 | // NOTE: Variables are always resolved as the last definition, even if it is 48 | // after where it is used. 49 | @fancy-use-sprites: true; // false: suppress all background images (i.e. icons) 50 | 51 | @fancy-line-height: 20px; // height of a nodes selection bar including borders 52 | @fancy-node-v-spacing: 1px; // gap between two node borders 53 | @fancy-icon-width: 16px; 54 | @fancy-icon-height: 16px; 55 | @fancy-icon-spacing: 3px; // margin between icon/icon or icon/title 56 | @fancy-icon-ofs-top: 2px; // extra vertical offset for expander, checkbox and icon 57 | @fancy-title-ofs-top: 0px; // extra vertical offset for title 58 | @fancy-node-border-width: 1px; 59 | @fancy-node-border-radius: 3px; 60 | @fancy-node-outline-width: 1px; 61 | 62 | // We need to define this variable here (not in skin-common.less) to make it 63 | // work with grunt and webpack: 64 | @fancy-image-prefix: "./skin-win7/"; 65 | 66 | // Use 'data-uri(...)' to embed the image into CSS instead of linking to 'loading.gif': 67 | // @fancy-loading-url: data-uri("@{fancy-image-prefix}loading.gif"); 68 | // Set to `true` to use `data-uri(...)` which will embed icons.gif into CSS 69 | // instead of linking to that file: 70 | // @fancy-inline-sprites: true; 71 | 72 | 73 | ul.fancytree-container { 74 | 75 | } 76 | 77 | /******************************************************************************* 78 | * Node titles 79 | */ 80 | span.fancytree-title { 81 | } 82 | // active nodes inside an UN-focused tree are gray instead of blue 83 | span.fancytree-active .fancytree-title, 84 | span.fancytree-selected .fancytree-title { 85 | .spanStyleMixin(inherit, #e5e5e5, #d9d9d9, #fafafb, #e5e5e5); 86 | } 87 | span.fancytree-selected .fancytree-title { 88 | font-style: italic; 89 | } 90 | // Markers inside an active tree 91 | .fancytree-treefocus { 92 | span.fancytree-active .fancytree-title, 93 | span.fancytree-selected .fancytree-title { 94 | .spanStyleMixin(inherit, #f6fbfd, #99defd, #f6fbfd, #d5effc); 95 | } 96 | span.fancytree-focused span.fancytree-title { 97 | border: @fancy-node-border-width solid #719acb; 98 | } 99 | } 100 | // Hover is always colored (even if tree is inactive) 101 | span.fancytree-title:hover { 102 | .spanStyleMixin(inherit, #f8fcfe, #d8f0fa, #f8fcfe, #eff9fe); 103 | } 104 | span.fancytree-active .fancytree-title:hover, 105 | span.fancytree-selected .fancytree-title:hover { 106 | .spanStyleMixin(inherit, #f2f9fd, #719acb, #f2f9fd, #c4e8fa); 107 | } 108 | 109 | /******************************************************************************* 110 | * 'table' extension 111 | */ 112 | 113 | table.fancytree-ext-table tbody { 114 | tr td { 115 | border: 1px solid #ededed; 116 | } 117 | tr:hover { 118 | .spanStyleMixin(inherit, #f8fcfe, inherit, #f8fcfe, #eff9fe); 119 | outline: 1px solid #d8f0fa; 120 | } 121 | // tr:hover td { 122 | // outline: 1px solid #D8F0FA; 123 | // } 124 | tr.fancytree-focused { 125 | // background-color: #99DEFD; 126 | outline: 1px dotted #090402; 127 | } 128 | span.fancytree-focused span.fancytree-title { 129 | outline: solid dotted black; 130 | } 131 | 132 | // Title gets a white background, when hovered. Undo standard node formatting 133 | span.fancytree-title:hover { 134 | border: 1px solid transparent; 135 | background: inherit; 136 | background: transparent; 137 | background: none; 138 | filter: none; 139 | } 140 | 141 | tr.fancytree-active:hover, 142 | tr.fancytree-selected:hover { 143 | .spanStyleMixin(inherit, #f2f9fd, inherit, #f2f9fd, #c4e8fa); 144 | outline: 1px solid #B6E6FB; 145 | } 146 | tr.fancytree-active, 147 | tr.fancytree-selected { 148 | .spanStyleMixin(inherit, #f6fbfd, inherit, #f6fbfd, #d5effc); 149 | outline: 1px solid #99DEFD; 150 | } 151 | // tr.fancytree-selected .fancytree-title { 152 | // font-style: italic; 153 | // } 154 | 155 | } 156 | -------------------------------------------------------------------------------- /css/jquery.layout.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Default Layout Theme 3 | * 4 | * Created for jquery.layout 5 | * 6 | * Copyright (c) 2010 7 | * Fabrizio Balliano (http://www.fabrizioballiano.net) 8 | * Kevin Dalman (http://allpro.net) 9 | * 10 | * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html) 11 | * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses. 12 | * 13 | * Last Updated: 2010-02-10 14 | * NOTE: For best code readability, view this with a fixed-space font and tabs equal to 4-chars 15 | */ 16 | 17 | /* 18 | * DEFAULT FONT 19 | * Just to make demo-pages look better - not actually relevant to Layout! 20 | */ 21 | 22 | /* 23 | * PANES & CONTENT-DIVs 24 | */ 25 | .ui-layout-pane { /* all 'panes' */ 26 | background: #FFF; 27 | border: 1px solid #BBB; 28 | padding: 10px; 29 | overflow: auto; 30 | /* DO NOT add scrolling (or padding) to 'panes' that have a content-div, 31 | otherwise you may get double-scrollbars - on the pane AND on the content-div 32 | - use ui-layout-wrapper class if pane has a content-div 33 | - use ui-layout-container if pane has an inner-layout 34 | */ 35 | } 36 | /* (scrolling) content-div inside pane allows for fixed header(s) and/or footer(s) */ 37 | .ui-layout-content { 38 | padding: 10px; 39 | position: relative; /* contain floated or positioned elements */ 40 | overflow: auto; /* add scrolling to content-div */ 41 | } 42 | 43 | /* 44 | * UTILITY CLASSES 45 | * Must come AFTER pane-class above so will override 46 | * These classes are NOT auto-generated and are NOT used by Layout 47 | */ 48 | .layout-child-container, 49 | .layout-content-container { 50 | padding: 0; 51 | overflow: hidden; 52 | } 53 | .layout-child-container { 54 | border: 0; /* remove border because inner-layout-panes probably have borders */ 55 | } 56 | .layout-scroll { 57 | overflow: auto; 58 | } 59 | .layout-hide { 60 | display: none; 61 | } 62 | 63 | /* 64 | * RESIZER-BARS 65 | */ 66 | .ui-layout-resizer { /* all 'resizer-bars' */ 67 | background: #DDD; 68 | border: 1px solid #BBB; 69 | border-width: 0; 70 | } 71 | .ui-layout-resizer-drag { /* REAL resizer while resize in progress */ 72 | } 73 | .ui-layout-resizer-hover { /* affects both open and closed states */ 74 | } 75 | /* NOTE: It looks best when 'hover' and 'dragging' are set to the same color, 76 | otherwise color shifts while dragging when bar can't keep up with mouse */ 77 | .ui-layout-resizer-open-hover , /* hover-color to 'resize' */ 78 | .ui-layout-resizer-dragging { /* resizer beging 'dragging' */ 79 | background: #C4E1A4; 80 | } 81 | .ui-layout-resizer-dragging { /* CLONED resizer being dragged */ 82 | border: 1px solid #BBB; 83 | } 84 | /* NOTE: Add a 'dragging-limit' color to provide visual feedback when resizer hits min/max size limits */ 85 | .ui-layout-resizer-dragging-limit { /* CLONED resizer at min or max size-limit */ 86 | background: #E1A4A4; /* red */ 87 | } 88 | 89 | .ui-layout-resizer-closed-hover { /* hover-color to 'slide open' */ 90 | background: #EBD5AA; 91 | } 92 | .ui-layout-resizer-sliding { /* resizer when pane is 'slid open' */ 93 | opacity: .10; /* show only a slight shadow */ 94 | filter: alpha(opacity=10); 95 | } 96 | .ui-layout-resizer-sliding-hover { /* sliding resizer - hover */ 97 | opacity: 1.00; /* on-hover, show the resizer-bar normally */ 98 | filter: alpha(opacity=100); 99 | } 100 | /* sliding resizer - add 'outside-border' to resizer on-hover 101 | * this sample illustrates how to target specific panes and states */ 102 | .ui-layout-resizer-north-sliding-hover { border-bottom-width: 1px; } 103 | .ui-layout-resizer-south-sliding-hover { border-top-width: 1px; } 104 | .ui-layout-resizer-west-sliding-hover { border-right-width: 1px; } 105 | .ui-layout-resizer-east-sliding-hover { border-left-width: 1px; } 106 | 107 | /* 108 | * TOGGLER-BUTTONS 109 | */ 110 | .ui-layout-toggler { 111 | border: 1px solid #BBB; /* match pane-border */ 112 | background-color: #BBB; 113 | } 114 | .ui-layout-resizer-hover .ui-layout-toggler { 115 | opacity: .60; 116 | filter: alpha(opacity=60); 117 | } 118 | .ui-layout-toggler-hover , /* need when NOT resizable */ 119 | .ui-layout-resizer-hover .ui-layout-toggler-hover { /* need specificity when IS resizable */ 120 | background-color: #FC6; 121 | opacity: 1.00; 122 | filter: alpha(opacity=100); 123 | } 124 | .ui-layout-toggler-north , 125 | .ui-layout-toggler-south { 126 | border-width: 0 1px; /* left/right borders */ 127 | } 128 | .ui-layout-toggler-west , 129 | .ui-layout-toggler-east { 130 | border-width: 1px 0; /* top/bottom borders */ 131 | } 132 | /* hide the toggler-button when the pane is 'slid open' */ 133 | .ui-layout-resizer-sliding .ui-layout-toggler { 134 | display: none; 135 | } 136 | /* 137 | * style the text we put INSIDE the togglers 138 | */ 139 | .ui-layout-toggler .content { 140 | color: #666; 141 | font-size: 12px; 142 | font-weight: bold; 143 | width: 100%; 144 | padding-bottom: 0.35ex; /* to 'vertically center' text inside text-span */ 145 | } 146 | 147 | /* 148 | * PANE-MASKS 149 | * these styles are hard-coded on mask elems, but are also 150 | * included here as !important to ensure will overrides any generic styles 151 | */ 152 | .ui-layout-mask { 153 | border: none !important; 154 | padding: 0 !important; 155 | margin: 0 !important; 156 | overflow: hidden !important; 157 | position: absolute !important; 158 | opacity: 0 !important; 159 | filter: Alpha(Opacity="0") !important; 160 | } 161 | .ui-layout-mask-inside-pane { /* masks always inside pane EXCEPT when pane is an iframe */ 162 | top: 0 !important; 163 | left: 0 !important; 164 | width: 100% !important; 165 | height: 100% !important; 166 | } 167 | div.ui-layout-mask {} /* standard mask for iframes */ 168 | iframe.ui-layout-mask {} /* extra mask for objects/applets */ 169 | 170 | -------------------------------------------------------------------------------- /lib/fancytree_dist/skin-bootstrap-n/ui.fancytree.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Fancytree "bootstrap" skin (highlighting the node span instead of title-only). 3 | * 4 | * DON'T EDIT THE CSS FILE DIRECTLY, since it is automatically generated from 5 | * the LESS templates. 6 | */ 7 | 8 | // Import common styles 9 | @import "../skin-common.less"; 10 | 11 | 12 | /******************************************************************************* 13 | * Styles specific to this skin. 14 | * 15 | * This section is automatically generated from the `ui-fancytree.less` template. 16 | ******************************************************************************/ 17 | 18 | 19 | // local vars 20 | // @fancy-my-icon-size: 16px; 21 | 22 | // Override the variable after the import. 23 | // NOTE: Variables are always resolved as the last definition, even if it is 24 | // after where it is used. 25 | @fancy-use-sprites: false; // false: suppress all background images (i.e. icons) 26 | @fancy-loading-url: none; 27 | 28 | @fancy-icon-width: 1em; 29 | @fancy-icon-height: 1em; 30 | @fancy-line-height: 1em; 31 | @fancy-icon-spacing: 0.5em; 32 | 33 | // Use 'data-uri(...)' to embed the image into CSS instead of linking to 'loading.gif': 34 | // @fancy-loading-url: data-uri("@{fancy-image-prefix}loading.gif"); 35 | // Set to `true` to use `data-uri(...)` which will embed icons.gif into CSS 36 | // instead of linking to that file: 37 | // @fancy-inline-sprites: true; 38 | 39 | // We need to define this variable here (not in skin-common.less) to make it 40 | // work with grunt and webpack: 41 | @fancy-image-prefix: "./skin-bootstrap-n/"; 42 | 43 | ul.fancytree-container ul { 44 | padding: 0 0 0 1.5em; 45 | margin: 0; 46 | } 47 | /* Prevent focus frame */ 48 | .fancytree-container:focus { 49 | outline: none; 50 | } 51 | 52 | // Error status node 53 | .fancytree-container span.fancytree-statusnode-error span.fancytree-expander { 54 | color: @fancy-font-error-color; 55 | } 56 | 57 | ///// 58 | // Original bootstrap colors (http://getbootstrap.com/css/#responsive-utilities) 59 | @gray-darker: lighten(#000, 13.5%); // #222 60 | @gray-dark: lighten(#000, 20%); // #333 61 | @gray: lighten(#000, 33.5%); // #555 62 | @gray-light: lighten(#000, 60%); // #999 63 | @gray-lighter: lighten(#000, 93.5%); // #eee 64 | 65 | @brand-primary: #428bca; // blue 66 | @brand-success: #5cb85c; // green 67 | @brand-info: #5bc0de; // light blue 68 | @brand-warning: #f0ad4e; // orange 69 | @brand-danger: #d9534f; // red 70 | 71 | @border-radius-base: 4px; 72 | @border-radius-large: 6px; 73 | @border-radius-small: 3px; 74 | ///////////// 75 | 76 | span.fancytree-node { 77 | border: @fancy-node-border-width solid transparent; // avoid jumping, when a border is added on hover 78 | border-radius: @border-radius-small; 79 | padding-left: 8px; 80 | } 81 | span.fancytree-title { 82 | border-radius: @border-radius-small; 83 | } 84 | // Inactive tree: 85 | span.fancytree-node.fancytree-selected { // selected nodes inside inactive tree 86 | background-color: lighten(@brand-success, 10%); 87 | border-color: lighten(@brand-success, 10%); 88 | span.fancytree-title { 89 | background-color: lighten(@brand-success, 10%); // green title, even when active 90 | } 91 | } 92 | span.fancytree-node.fancytree-active { // active nodes inside inactive tree 93 | background-color: lighten(@brand-primary, 10%); 94 | } 95 | // Active tree: 96 | .fancytree-container.fancytree-treefocus { 97 | span.fancytree-node:hover { 98 | background-color: lighten(@brand-primary, 42%); 99 | } 100 | span.fancytree-node.fancytree-focused { 101 | border-color: @brand-primary; 102 | } 103 | span.fancytree-node.fancytree-selected { 104 | background-color: @brand-success; 105 | span.fancytree-title { 106 | background-color: @brand-success; // green title, even when active 107 | } 108 | } 109 | span.fancytree-node.fancytree-active { 110 | background-color: @brand-primary; 111 | border-color: @brand-primary; 112 | } 113 | } 114 | 115 | /******************************************************************************* 116 | * 'table' extension 117 | */ 118 | table.fancytree-ext-table tbody { 119 | tr td { 120 | border: 1px solid @gray-lighter; 121 | } 122 | // span.fancytree-node, 123 | // span.fancytree-node:hover { // undo standard tree css 124 | // border: none; 125 | // background: none; 126 | // } 127 | // // Title get's a white background, when hovered. Undo standard node formatting 128 | // span.fancytree-title:hover { 129 | // border: none; 130 | // background: inherit; 131 | // background: transparent; 132 | // background: none; 133 | // filter: none; 134 | // } 135 | // dimmed, if inside inactive tree 136 | tr.fancytree-selected { 137 | background-color: lighten(@brand-success, 10%); 138 | span.fancytree-node { 139 | background-color: lighten(@brand-success, 10%); 140 | } 141 | span.fancytree-title { 142 | background-color: lighten(@brand-success, 10%); // green title, even when active 143 | } 144 | } 145 | tr.fancytree-active { // dimmed, if inside inactive tree 146 | background-color: lighten(@brand-primary, 10%); 147 | span.fancytree-node { 148 | background-color: lighten(@brand-primary, 10%); 149 | } 150 | } 151 | } 152 | 153 | table.fancytree-ext-table.fancytree-treefocus tbody { 154 | tr:hover { 155 | background-color: lighten(@brand-primary, 42%); 156 | // outline: 1px solid @brand-primary; 157 | } 158 | tr.fancytree-focused span.fancytree-title { 159 | outline: 1px dotted @brand-primary; 160 | } 161 | tr.fancytree-active:hover, 162 | tr.fancytree-selected:hover { 163 | // background-color: #CBE8F6; 164 | // outline: 1px solid #26A0DA; 165 | } 166 | tr.fancytree-selected { 167 | background-color: @brand-success; 168 | span.fancytree-node { 169 | background-color: @brand-success; 170 | } 171 | span.fancytree-title { 172 | background-color: @brand-success; // green title, even when active 173 | } 174 | } 175 | tr.fancytree-active { 176 | background-color: @brand-primary; 177 | span.fancytree-node { 178 | background-color: @brand-primary; 179 | } 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /lib/codemirror/addon/scrollffff/simplescrollbars.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: https://codemirror.net/5/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | function Bar(cls, orientation, scroll) { 15 | this.orientation = orientation; 16 | this.scroll = scroll; 17 | this.screen = this.total = this.size = 1; 18 | this.pos = 0; 19 | 20 | this.node = document.createElement("div"); 21 | this.node.className = cls + "-" + orientation; 22 | this.inner = this.node.appendChild(document.createElement("div")); 23 | 24 | var self = this; 25 | CodeMirror.on(this.inner, "mousedown", function(e) { 26 | if (e.which != 1) return; 27 | CodeMirror.e_preventDefault(e); 28 | var axis = self.orientation == "horizontal" ? "pageX" : "pageY"; 29 | var start = e[axis], startpos = self.pos; 30 | function done() { 31 | CodeMirror.off(document, "mousemove", move); 32 | CodeMirror.off(document, "mouseup", done); 33 | } 34 | function move(e) { 35 | if (e.which != 1) return done(); 36 | self.moveTo(startpos + (e[axis] - start) * (self.total / self.size)); 37 | } 38 | CodeMirror.on(document, "mousemove", move); 39 | CodeMirror.on(document, "mouseup", done); 40 | }); 41 | 42 | CodeMirror.on(this.node, "click", function(e) { 43 | CodeMirror.e_preventDefault(e); 44 | var innerBox = self.inner.getBoundingClientRect(), where; 45 | if (self.orientation == "horizontal") 46 | where = e.clientX < innerBox.left ? -1 : e.clientX > innerBox.right ? 1 : 0; 47 | else 48 | where = e.clientY < innerBox.top ? -1 : e.clientY > innerBox.bottom ? 1 : 0; 49 | self.moveTo(self.pos + where * self.screen); 50 | }); 51 | 52 | function onWheel(e) { 53 | var moved = CodeMirror.wheelEventPixels(e)[self.orientation == "horizontal" ? "x" : "y"]; 54 | var oldPos = self.pos; 55 | self.moveTo(self.pos + moved); 56 | if (self.pos != oldPos) CodeMirror.e_preventDefault(e); 57 | } 58 | CodeMirror.on(this.node, "mousewheel", onWheel); 59 | CodeMirror.on(this.node, "DOMMouseScroll", onWheel); 60 | } 61 | 62 | Bar.prototype.setPos = function(pos, force) { 63 | if (pos < 0) pos = 0; 64 | if (pos > this.total - this.screen) pos = this.total - this.screen; 65 | if (!force && pos == this.pos) return false; 66 | this.pos = pos; 67 | this.inner.style[this.orientation == "horizontal" ? "left" : "top"] = 68 | (pos * (this.size / this.total)) + "px"; 69 | return true 70 | }; 71 | 72 | Bar.prototype.moveTo = function(pos) { 73 | if (this.setPos(pos)) this.scroll(pos, this.orientation); 74 | } 75 | 76 | var minButtonSize = 10; 77 | 78 | Bar.prototype.update = function(scrollSize, clientSize, barSize) { 79 | var sizeChanged = this.screen != clientSize || this.total != scrollSize || this.size != barSize 80 | if (sizeChanged) { 81 | this.screen = clientSize; 82 | this.total = scrollSize; 83 | this.size = barSize; 84 | } 85 | 86 | var buttonSize = this.screen * (this.size / this.total); 87 | if (buttonSize < minButtonSize) { 88 | this.size -= minButtonSize - buttonSize; 89 | buttonSize = minButtonSize; 90 | } 91 | this.inner.style[this.orientation == "horizontal" ? "width" : "height"] = 92 | buttonSize + "px"; 93 | this.setPos(this.pos, sizeChanged); 94 | }; 95 | 96 | function SimpleScrollbars(cls, place, scroll) { 97 | this.addClass = cls; 98 | this.horiz = new Bar(cls, "horizontal", scroll); 99 | place(this.horiz.node); 100 | this.vert = new Bar(cls, "vertical", scroll); 101 | place(this.vert.node); 102 | this.width = null; 103 | } 104 | 105 | SimpleScrollbars.prototype.update = function(measure) { 106 | if (this.width == null) { 107 | var style = window.getComputedStyle ? window.getComputedStyle(this.horiz.node) : this.horiz.node.currentStyle; 108 | if (style) this.width = parseInt(style.height); 109 | } 110 | var width = this.width || 0; 111 | 112 | var needsH = measure.scrollWidth > measure.clientWidth + 1; 113 | var needsV = measure.scrollHeight > measure.clientHeight + 1; 114 | this.vert.node.style.display = needsV ? "block" : "none"; 115 | this.horiz.node.style.display = needsH ? "block" : "none"; 116 | 117 | if (needsV) { 118 | this.vert.update(measure.scrollHeight, measure.clientHeight, 119 | measure.viewHeight - (needsH ? width : 0)); 120 | this.vert.node.style.bottom = needsH ? width + "px" : "0"; 121 | } 122 | if (needsH) { 123 | this.horiz.update(measure.scrollWidth, measure.clientWidth, 124 | measure.viewWidth - (needsV ? width : 0) - measure.barLeft); 125 | this.horiz.node.style.right = needsV ? width + "px" : "0"; 126 | this.horiz.node.style.left = measure.barLeft + "px"; 127 | } 128 | 129 | return {right: needsV ? width : 0, bottom: needsH ? width : 0}; 130 | }; 131 | 132 | SimpleScrollbars.prototype.setScrollTop = function(pos) { 133 | this.vert.setPos(pos); 134 | }; 135 | 136 | SimpleScrollbars.prototype.setScrollLeft = function(pos) { 137 | this.horiz.setPos(pos); 138 | }; 139 | 140 | SimpleScrollbars.prototype.clear = function() { 141 | var parent = this.horiz.node.parentNode; 142 | parent.removeChild(this.horiz.node); 143 | parent.removeChild(this.vert.node); 144 | }; 145 | 146 | CodeMirror.scrollbarModel.simple = function(place, scroll) { 147 | return new SimpleScrollbars("CodeMirror-simplescroll", place, scroll); 148 | }; 149 | CodeMirror.scrollbarModel.overlay = function(place, scroll) { 150 | return new SimpleScrollbars("CodeMirror-overlayscroll", place, scroll); 151 | }; 152 | }); 153 | -------------------------------------------------------------------------------- /app/Shapes/DcgTerminalShape.js: -------------------------------------------------------------------------------- 1 | var DcgTerminalShape = fabric.util.createClass(fabric.Group, { 2 | type: 'dcgTerminalShape', 3 | // initialize can be of type function(options) or function(property, options), like for text. 4 | // no other signatures allowed. 5 | initialize: function(options) { 6 | options || (options = { }); 7 | 8 | this.callSuper('initialize',[], options); 9 | this.set({ 10 | originX: 'center', 11 | originY: 'center', 12 | objectCaching: false, 13 | hasControls: true 14 | }); 15 | 16 | 17 | // TODO: when will these contained shapes be calculated? 18 | // - can we get drop-preview? (mark group border green, when we're going to drop on it) 19 | this.isDataShape = true; 20 | this.value = null; 21 | 22 | }, 23 | 24 | defaultContent: function(){ 25 | return { 26 | value: "[a]" 27 | }; 28 | 29 | }, 30 | // gather all ports, with positions relative to the shape left/top 31 | gatherPorts: function(){ 32 | // top and bottom ports 33 | var topPort = {parent:this, shapeId:this.id, role:"in",x:0,y:-this.height/2}; 34 | var bottomPort = {parent:this, shapeId:this.id, role:"out",x:0,y:this.height/2}; 35 | 36 | return [topPort, bottomPort]; 37 | }, 38 | 39 | 40 | updateContents: function(shapeData) { 41 | 42 | // delete all the old content 43 | this.argumentRows = []; 44 | if(this.bg != null){ 45 | this.remove(this.value); 46 | this.remove(this.bg); 47 | } 48 | var startx = this.left; 49 | var starty = this.top; 50 | var incomingx = startx; 51 | var incomingy = starty; 52 | 53 | var maxWidth = 0; 54 | var totHeight = 0; 55 | var padding = 4; 56 | var bottomPad = 2; // extra padding after last row 57 | 58 | this.value = new PrologText(shapeData.value,{fontSize:11, objectCaching: false,originX: 'center', fill:'white',fontFamily:'arial'}); 59 | 60 | maxWidth = this.value.width + padding * 2; 61 | totHeight += this.value.height + padding * 2; 62 | 63 | // set minimum width 64 | if(maxWidth < 50) 65 | maxWidth = 50 66 | 67 | // place controls 68 | var top = 0; 69 | 70 | this.bg = new RoundedRect({ 71 | topLeft:[5,5], 72 | topRight : [5,5], 73 | bottomLeft: [5,5], 74 | bottomRight: [5,5], 75 | top: this.top, 76 | left: this.left, 77 | width: 30, 78 | height: 30, 79 | fill: '#ffaaaa', 80 | rx: 5, 81 | ry: 5 82 | }); 83 | var bg = this.bg; 84 | 85 | totHeight += bottomPad; 86 | 87 | // center the bg rect on midpoint 88 | bg.width = maxWidth; 89 | bg.height = totHeight; 90 | bg.left = this.left - bg.width/2; 91 | bg.top = this.top - bg.height/2; 92 | startx = bg.left; 93 | starty = bg.top; 94 | this.addWithUpdate(bg); 95 | 96 | 97 | this.value.left = startx + maxWidth/2; // - this.value.width / 2; 98 | this.value.top = starty + top + padding; 99 | this.addWithUpdate(this.value); 100 | 101 | this.left = incomingx; 102 | this.top = incomingy; 103 | }, 104 | 105 | toObject: function() { 106 | return fabric.util.object.extend(this.callSuper('toObject'), { 107 | label: this.get('label') 108 | }); 109 | }, 110 | 111 | _render: function(ctx) { 112 | this.callSuper('_render', ctx); 113 | 114 | ctx.font = '20px Helvetica'; 115 | ctx.fillStyle = '#333'; 116 | }, 117 | 118 | 119 | buildInputPanel: function(view, figure){ 120 | // bygg HTML för panel 121 | var userData = app.view.getShapeModel(figure.id).data; 122 | view.html(""); 123 | 124 | view.append('
'+ 125 | '
'+ 126 | ' DCG Terminal'+ 127 | '
'+ 128 | '
'+ 129 | '
'+ 130 | '
'+ 131 | ' ' + 132 | ' '); 133 | 134 | view.append( 135 | ' '+ 136 | '
'+ 137 | '
'+ 138 | '
'); 139 | 140 | $("#ok_button").on("click", function(){ 141 | var userData = app.view.getShapeModel(figure.id).data; 142 | 143 | userData.value = $("#arg_terminal").val(); 144 | 145 | figure.updateContents(userData); 146 | app.view.canvas.renderAll(); 147 | }); 148 | }, 149 | 150 | // a dcg rule call/ reference is mostly just the same as a normal rule, except there can be a "pushback" part, and 151 | // also that it is signified by "-->" instead of ":-" 152 | parseToExpression:function(shapeData, rpc){ 153 | var data = shapeData.data; 154 | var value = data.value; 155 | 156 | var valueExpression = null; 157 | 158 | // experimental parsing-code - later, make it so we don't have to create a new parser for each argument :) 159 | // - store a parser in rpc 160 | var tokens = Lexer.GetTokens(value); 161 | tokens = tokens.filter(t=>t.type != TokenType.Blankspace); 162 | var parser = new PrologParser(tokens); 163 | var res = parser.parseThis(); 164 | valueExpression = res; 165 | 166 | // build and return an expression 167 | var body = ShapeParsing.parseAllBelow(shapeData, rpc); 168 | return new DcgTerminalExpression(valueExpression, body); 169 | } 170 | 171 | 172 | }); -------------------------------------------------------------------------------- /app/Shapes/LogicShape.js: -------------------------------------------------------------------------------- 1 | //const { fabric } = require("./lib/fabric.min"); 2 | 3 | var LogicShape = fabric.util.createClass(fabric.Group, { 4 | type: 'logicShape', 5 | // initialize can be of type function(options) or function(property, options), like for text. 6 | // no other signatures allowed. 7 | initialize: function(options) { 8 | options || (options = { originX:'center' }); 9 | 10 | this.callSuper('initialize',[], options); 11 | this.set({ 12 | originX: 'center', 13 | originY: 'center', 14 | objectCaching: false 15 | }); 16 | // to store refs to the rows of displayitems 17 | this.operatorText = null; 18 | this.isDataShape = true; 19 | 20 | }, 21 | 22 | // gather all ports, with positions relative to the shape 23 | gatherPorts: function(){ 24 | // top and bottom ports 25 | var topPort = {parent:this, shapeId:this.id, role:"in",x:0,y:-this.height/2}; 26 | 27 | var bottomPort = {parent:this, shapeId:this.id, role:"out",x:0,y:this.height/2}; 28 | 29 | return [topPort, bottomPort]; 30 | }, 31 | 32 | defaultContent: function(){ 33 | return { 34 | operator: "1ST" 35 | } 36 | }, 37 | 38 | updateContents: function(shapeData) { 39 | 40 | // delete all the old content 41 | if(this.circle != null){ 42 | this.remove(this.circle); 43 | this.remove(this.rect); 44 | this.remove(this.operatorText); 45 | } 46 | 47 | var startx = this.left; 48 | var starty = this.top; 49 | var incomingx = startx; 50 | var incomingy = starty; 51 | 52 | // Select style depending on operator 53 | var styles = [ 54 | {op:"AND", background_col:"#00a8f0",text_col:"white"}, 55 | {op:"OR", background_col:"yellow",text_col:"black"}, 56 | {op:"1ST", background_col:"orange",text_col:"black"}, 57 | {op:"NOT", background_col:"red",text_col:"white"}, 58 | {op:"CUT", background_col:"purple",text_col:"white"} 59 | ]; 60 | 61 | var style = styles.find(s => s.op == shapeData.operator); 62 | 63 | // place controls 64 | this.circle = new fabric.Circle({ 65 | top: starty, 66 | left: startx, 67 | strokeWidth: 0, 68 | originX: 'center', 69 | originY: 'center', 70 | fill: style.background_col, 71 | radius: 15 }); 72 | 73 | this.rect = new fabric.Rect({ 74 | top: starty+15, 75 | left: startx, 76 | width: 30, 77 | originX: 'center', 78 | originY: 'center', 79 | height: 20, 80 | strokeWidth : 0, 81 | fill: style.background_col 82 | }); 83 | 84 | 85 | this.operatorText = new fabric.Text(shapeData.operator,{ 86 | fontSize:11, 87 | top: starty+20, 88 | left: startx, 89 | fill: style.text_col, 90 | fontWeight: 'bold', 91 | originX: 'center', 92 | originY: 'center', 93 | fontFamily:'arial'}); 94 | 95 | this.circle.top = starty; 96 | 97 | this.addWithUpdate(this.circle); 98 | 99 | this.rect.top = starty + 12; 100 | this.operatorText.top = starty + 5; 101 | 102 | //this.operatorText.top = this.top; // - this.operatorText.height/2; 103 | //this.operatorText.left = circle.left;// - this.operatorText.width/2; 104 | 105 | //this.width = circle.width; 106 | //this.height = circle.height; 107 | 108 | // center the bg rect on midpoint 109 | //bg.left = this.left - bg.width/2; 110 | //bg.top = this.top - bg.height/2; 111 | //startx = circle.left; 112 | ///starty = circle.top; 113 | 114 | this.addWithUpdate(this.rect); 115 | 116 | this.addWithUpdate(this.operatorText); 117 | 118 | //this.left = incomingx; 119 | this.top = incomingy; 120 | 121 | }, 122 | 123 | toObject: function() { 124 | return fabric.util.object.extend(this.callSuper('toObject'), { 125 | label: this.get('label') 126 | }); 127 | }, 128 | 129 | _render: function(ctx) { 130 | this.callSuper('_render', ctx); 131 | 132 | ctx.font = '20px Helvetica'; 133 | ctx.fillStyle = '#333'; 134 | }, 135 | 136 | buildInputPanel: function(view, figure){ 137 | // bygg HTML för panel 138 | // modify library and rule names 139 | var userData = app.view.getShapeModel(figure.id).data; 140 | view.html(""); 141 | 142 | view.append('
' + 143 | '
'+ 144 | ' Logic'+ 145 | '
'+ 146 | '
'+ 147 | '
'+ 148 | '
'); 149 | 150 | var options = ["AND", "OR", "1ST","NOT","CUT"]; 151 | var radiohtml = ""; 152 | for(option of options){ 153 | radiohtml += '' + option + '
\n'; 161 | } 162 | 163 | view.append(radiohtml + 164 | '
'+ 165 | '
'+ 166 | '
'); 167 | 168 | $("input[type='radio']").change(function () { 169 | var selection=$(this).val(); 170 | 171 | var userData = app.view.getShapeModel(figure.id); 172 | userData.data.operator = selection; 173 | //figure.updateContents(userData); 174 | //this.canvas.renderAll(); 175 | app.view.updateShapeContents(userData); 176 | app.view.canvas.renderAll(); 177 | }); 178 | 179 | }, 180 | 181 | parseToExpression:function(shapeData, rpc){ 182 | var data = shapeData.data; 183 | 184 | // first, parse all the child-branches 185 | // we will get (possibly) two collections of branches; "true" (cojunctionExpressions) and "false", for connected shapes 186 | var childBranches = ShapeParsing.parseAllBelow(shapeData, rpc); 187 | var cojunctionExpressions = childBranches.cojunctionExpressions; 188 | var elseExpressions = childBranches.elseExpressions; 189 | 190 | return new LogicExpression(data.operator, cojunctionExpressions, elseExpressions); 191 | }, 192 | 193 | }); -------------------------------------------------------------------------------- /lib/fancytree_dist/modules/jquery.fancytree.columnview.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jquery.fancytree.columnview.js 3 | * 4 | * Render tree like a Mac Finder's column view. 5 | * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) 6 | * 7 | * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) 8 | * 9 | * Released under the MIT license 10 | * https://github.com/mar10/fancytree/wiki/LicenseInfo 11 | * 12 | * @version 2.37.0 13 | * @date 2020-09-11T18:58:08Z 14 | */ 15 | 16 | (function(factory) { 17 | if (typeof define === "function" && define.amd) { 18 | // AMD. Register as an anonymous module. 19 | define(["jquery", "./jquery.fancytree"], factory); 20 | } else if (typeof module === "object" && module.exports) { 21 | // Node/CommonJS 22 | require("./jquery.fancytree"); 23 | module.exports = factory(require("jquery")); 24 | } else { 25 | // Browser globals 26 | factory(jQuery); 27 | } 28 | })(function($) { 29 | "use strict"; 30 | 31 | /******************************************************************************* 32 | * Private functions and variables 33 | */ 34 | var _assert = $.ui.fancytree.assert, 35 | FT = $.ui.fancytree; 36 | 37 | /******************************************************************************* 38 | * Private functions and variables 39 | */ 40 | $.ui.fancytree.registerExtension({ 41 | name: "columnview", 42 | version: "2.37.0", 43 | // Default options for this extension. 44 | options: {}, 45 | // Overide virtual methods for this extension. 46 | // `this` : is this extension object 47 | // `this._base` : the Fancytree instance 48 | // `this._super`: the virtual function that was overriden (member of prev. extension or Fancytree) 49 | treeInit: function(ctx) { 50 | var $tdFirst, 51 | $ul, 52 | tree = ctx.tree, 53 | $table = tree.widget.element; 54 | 55 | tree.tr = $("tbody tr", $table)[0]; 56 | tree.$tdList = $(">td", tree.tr); 57 | tree.columnCount = tree.$tdList.length; 58 | // Perform default behavior 59 | this._superApply(arguments); 60 | // Standard Fancytree created a root