tree uses now png or svg images, still some do not yet exist as png or svg
@ -78,7 +78,7 @@ var et2_tree = et2_inputWidget.extend(
|
|||||||
"name": "Image directory",
|
"name": "Image directory",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": this.egw().webserverUrl + "/phpgwapi/templates/default/images/dhtmlxtree/",
|
"default": this.egw().webserverUrl + "/phpgwapi/templates/default/images/dhtmlxtree/",
|
||||||
"description": "Directory for tree structure images"
|
"description": "Directory for tree structure images, set on server-side to 'dhtmlx' subdir of templates image-directory"
|
||||||
},
|
},
|
||||||
"value": {
|
"value": {
|
||||||
"type": "any",
|
"type": "any",
|
||||||
@ -100,7 +100,7 @@ var et2_tree = et2_inputWidget.extend(
|
|||||||
"name": "Standard images",
|
"name": "Standard images",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "",
|
"default": "",
|
||||||
"description": "comma-separated names of icons for a leaf, closed and opend folder (default: leaf.gif,folderClosed.gif,folderOpen.gif), images with extension get loaded from image_path, just 'image' or 'appname/image' are allowed too"
|
"description": "comma-separated names of icons for a leaf, closed and opend folder (default: leaf.png,folderClosed.png,folderOpen.png), images with extension get loaded from image_path, just 'image' or 'appname/image' are allowed too"
|
||||||
},
|
},
|
||||||
"multimarking": {
|
"multimarking": {
|
||||||
"name": "multimarking",
|
"name": "multimarking",
|
||||||
@ -207,6 +207,11 @@ var et2_tree = et2_inputWidget.extend(
|
|||||||
{
|
{
|
||||||
widget.setImages.apply(widget, widget.options.std_images.split(','));
|
widget.setImages.apply(widget, widget.options.std_images.split(','));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// calling setImages to get our png or svg default images
|
||||||
|
widget.setImages();
|
||||||
|
}
|
||||||
// Add in the callback so we can keep the two in sync
|
// Add in the callback so we can keep the two in sync
|
||||||
widget.input.AJAX_callback = function(dxmlObject) {
|
widget.input.AJAX_callback = function(dxmlObject) {
|
||||||
widget._dhtmlxtree_json_callback(JSON.parse(dxmlObject.xmlDoc.responseText), widget.input.lastLoadedXMLId);
|
widget._dhtmlxtree_json_callback(JSON.parse(dxmlObject.xmlDoc.responseText), widget.input.lastLoadedXMLId);
|
||||||
@ -243,10 +248,17 @@ var et2_tree = et2_inputWidget.extend(
|
|||||||
// Enable/Disable highlighting
|
// Enable/Disable highlighting
|
||||||
widget.input.enableHighlighting(widget.options.highlighting?true:false);
|
widget.input.enableHighlighting(widget.options.highlighting?true:false);
|
||||||
|
|
||||||
// show no more lines and left/down triangles instead of plus/minus
|
// if templates supplies open/close right/down arrows, show no more lines and use them instead of plus/minus
|
||||||
|
var open = egw.image('dhtmlxtree/open');
|
||||||
|
var close = egw.image('dhtmlxtree/close');
|
||||||
|
if (open && close)
|
||||||
|
{
|
||||||
widget.input.enableTreeLines(false);
|
widget.input.enableTreeLines(false);
|
||||||
widget.input.setImageArrays('plus', 'plus.png', 'plus.png', 'plus.png', 'plus.png', 'plus.png');
|
open = this._rel_url(open);
|
||||||
widget.input.setImageArrays('minus', 'minus.png', 'minus.png', 'minus.png', 'minus.png', 'minus.png');
|
widget.input.setImageArrays('plus', open, open, open, open, open);
|
||||||
|
close = this._rel_url(close);
|
||||||
|
widget.input.setImageArrays('minus', close, close, close, close, close);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -848,18 +860,18 @@ var et2_tree = et2_inputWidget.extend(
|
|||||||
/**
|
/**
|
||||||
* Set images for a specific node or all new nodes (default)
|
* Set images for a specific node or all new nodes (default)
|
||||||
*
|
*
|
||||||
* If images contain an extension eg. "leaf.gif" they are asumed to be in image path (/phpgwapi/templates/default/images/dhtmlxtree/).
|
* If images contain an extension eg. "leaf" they are asumed to be in image path (/phpgwapi/templates/default/images/dhtmlxtree/).
|
||||||
* Otherwise they get searched via egw.image() in current app, phpgwapi or can be specified as "app/image".
|
* Otherwise they get searched via egw.image() in current app, phpgwapi or can be specified as "app/image".
|
||||||
*
|
*
|
||||||
* @param {string} _leaf leaf image, default "leaf.gif"
|
* @param {string} _leaf leaf image, default "leaf"
|
||||||
* @param {string} _closed closed folder image, default "folderClosed.gif"
|
* @param {string} _closed closed folder image, default "folderClosed"
|
||||||
* @param {string} _open opened folder image, default "folderOpen.gif"
|
* @param {string} _open opened folder image, default "folderOpen"
|
||||||
* @param {string} _id if not given, standard images for new nodes are set
|
* @param {string} _id if not given, standard images for new nodes are set
|
||||||
*/
|
*/
|
||||||
setImages: function(_leaf, _closed, _open, _id)
|
setImages: function(_leaf, _closed, _open, _id)
|
||||||
{
|
{
|
||||||
var images = [_leaf || 'leaf.gif', _closed || 'folderClosed.gif', _open || 'folderOpen.gif'];
|
var images = [_leaf || 'dhtmlxtree/leaf', _closed || 'dhtmlxtree/folderClosed', _open || 'dhtmlxtree/folderOpen'];
|
||||||
var image_extensions = /\.(gif|png|jpe?g)/i;
|
var image_extensions = /\.(gif|png|jpe?g|svg)/i;
|
||||||
for(var i=0; i < 3; ++i)
|
for(var i=0; i < 3; ++i)
|
||||||
{
|
{
|
||||||
var image = images[i];
|
var image = images[i];
|
||||||
|
@ -38,9 +38,9 @@ class mail_tree
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
static $leafImages = array(
|
static $leafImages = array(
|
||||||
'folderNoSelectClosed' => "folderNoSelectClosed.gif",
|
'folderNoSelectClosed' => "folderNoSelectClosed.png",
|
||||||
'folderNoSelectOpen' => "folderNoSelectOpen.gif",
|
'folderNoSelectOpen' => "folderNoSelectOpen.png",
|
||||||
'folderOpen' => "folderOpen.gif",
|
'folderOpen' => "folderOpen.png",
|
||||||
'folderClosed' => "MailFolderClosed.png",
|
'folderClosed' => "MailFolderClosed.png",
|
||||||
'folderLeaf' => "MailFolderPlain.png",
|
'folderLeaf' => "MailFolderPlain.png",
|
||||||
'folderHome' => "kfm_home.png",
|
'folderHome' => "kfm_home.png",
|
||||||
|
Before Width: | Height: | Size: 87 B |
BIN
pixelegg/images/dhtmlxtree/close.png
Normal file
After Width: | Height: | Size: 476 B |
8
pixelegg/images/dhtmlxtree/close.svg
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<?xml-stylesheet type="text/css" href="../less/svg.css" ?>
|
||||||
|
<svg version="1.1" id="pixelegg_arrow_down" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="18px" height="18px" viewBox="-12 -12 54 54" enable-background="new 0 0 64 64" xml:space="preserve">
|
||||||
|
<polygon fill="#696969" stroke="#E6E6E6" stroke-miterlimit="10" points="1.75,5 1.749,5 16,28.49 30.251,5 "/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 662 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 123 B |
Before Width: | Height: | Size: 126 B |
Before Width: | Height: | Size: 126 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 71 B |
Before Width: | Height: | Size: 71 B |
Before Width: | Height: | Size: 64 B |
Before Width: | Height: | Size: 70 B |
Before Width: | Height: | Size: 64 B |
Before Width: | Height: | Size: 73 B |
Before Width: | Height: | Size: 67 B |
Before Width: | Height: | Size: 69 B |
Before Width: | Height: | Size: 64 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 457 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 92 B |
Before Width: | Height: | Size: 84 B |
Before Width: | Height: | Size: 93 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 90 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 82 B |
Before Width: | Height: | Size: 68 B |
BIN
pixelegg/images/dhtmlxtree/open.png
Normal file
After Width: | Height: | Size: 440 B |
8
pixelegg/images/dhtmlxtree/open.svg
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<?xml-stylesheet type="text/css" href="../less/svg.css" ?>
|
||||||
|
<svg version="1.1" id="pixelegg_arrow_right" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="18px" height="18px" viewBox="-12 -12 54 54" enable-background="new 0 0 32 32" xml:space="preserve">
|
||||||
|
<polygon fill="#696969" stroke="#E6E6E6" stroke-miterlimit="10" points="5.731,30.25 5.732,30.251 29.222,16 5.732,1.749 "/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 677 B |
Before Width: | Height: | Size: 89 B |
Before Width: | Height: | Size: 459 B |
Before Width: | Height: | Size: 89 B |
Before Width: | Height: | Size: 95 B |
Before Width: | Height: | Size: 88 B |
Before Width: | Height: | Size: 96 B |
Before Width: | Height: | Size: 89 B |
Before Width: | Height: | Size: 94 B |
Before Width: | Height: | Size: 89 B |
Before Width: | Height: | Size: 92 B |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 70 B |
Before Width: | Height: | Size: 241 B |
Before Width: | Height: | Size: 361 B |