Commit 8be70c91 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Adding new application to Plot data (based on NVD3).

Added new web-application to Plot data using NVD3.
parent f16285d4
......@@ -440,16 +440,14 @@ endfunction()
# binary_dir  :- The directory to copy files to and compile into.
#------------------------------------------------------------------------------
function(build_python_package package source_dir binary_dir)
file(GLOB_RECURSE _py_files
RELATIVE ${source_dir}
"*.py")
set(_py)
foreach(_py_file ${_py_files})
configure_file("${source_dir}/${_py_file}" "${binary_dir}/${_py_file}"
  COPYONLY)
list(APPEND _py "${binary_dir}/${_py_file}")
endforeach()
set (copy-complete "${binary_dir}/${package}-copy-complete")
copy_files_recursive("${source_dir}"
DESTINATION "${binary_dir}"
REGEX "^(.*\\.py)$"
OUTPUT ${copy-complete}
LABEL "Copying ${package} files")
set(CMAKE_CONFIGURABLE_FILE_CONTENT
"from compileall import compile_dir
......@@ -465,9 +463,100 @@ file.write('Done')
COMMAND ${PYTHON_EXECUTABLE} ARGS ${CMAKE_CURRENT_BINARY_DIR}/compile_py
COMMAND ${PYTHON_EXECUTABLE} ARGS -O ${CMAKE_CURRENT_BINARY_DIR}/compile_py
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/compile_py
${_py}
${copy-complete}
OUTPUT "${binary_dir}/${package}_complete"
COMMENT "Compiling Python files")
add_custom_target(${package} ALL DEPENDS "${binary_dir}/${package}_complete")
endfunction()
#------------------------------------------------------------------------------
# Function used to copy arbitrary files matching certain patterns.
# Usage:
# copy_files_recursive(<source-dir>
# DESTINATION <destination-dir>
# [LABEL "<label to use>"]
# [OUTPUT "<file generated to mark end of copying>"]
# [REGEX <regex> [EXCLUDE]]
# )
# One can specify multiple REGEX or REGEX <regex> EXCLUDE arguments.
#------------------------------------------------------------------------------
function(copy_files_recursive source-dir)
set (dest-dir)
set (patterns)
set (exclude-patterns)
set (output-file)
set (label "Copying files")
set (doing "")
foreach (arg ${ARGN})
if ("${arg}" MATCHES "^(DESTINATION|REGEX|OUTPUT|LABEL)$")
set (doing "${arg}")
elseif ("${doing}" STREQUAL "DESTINATION")
set (doing "")
set (dest-dir "${arg}")
elseif ("${doing}" STREQUAL "REGEX")
set (doing "SET")
list (APPEND patterns "${arg}")
elseif (("${arg}" STREQUAL "EXCLUDE") AND ("${doing}" STREQUAL "SET"))
set (doing "")
list (GET patterns -1 cur-pattern)
list (REMOVE_AT patterns -1)
list (APPEND exclude-patterns "${cur-pattern}")
elseif ("${doing}" STREQUAL "OUTPUT")
set (doing "")
set (output-file "${arg}")
elseif ("${doing}" STREQUAL "LABEL")
set (doing "")
set (label "${arg}")
else()
message(AUTHOR_WARNING "Unknown argument [${arg}]")
endif()
endforeach()
set (match-regex)
foreach (_item ${patterns})
if (match-regex)
set (match-regex "${match-regex}")
endif()
set (match-regex "${match-regex}${_item}")
endforeach()
set (exclude-regex)
foreach (_item ${exclude-patterns})
if (exclude-regex)
set (exclude-regex "${exclude-regex}|")
endif()
set (exclude-regex "${exclude-regex}${_item}")
endforeach()
file(GLOB_RECURSE _all_files RELATIVE "${source-dir}" "${source-dir}/*")
set (all_files)
set (copy-commands)
foreach (_file ${_all_files})
if (exclude-regex AND ("${_file}" MATCHES "${exclude-regex}"))
# skip
elseif ("${_file}" MATCHES "${match-regex}")
set (in-file "${source-dir}/${_file}")
set (out-file "${dest-dir}/${_file}")
get_filename_component(out-path ${out-file} PATH)
list (APPEND all_files ${in-file})
set (copy-commands "${copy-commands}
file(COPY \"${in-file}\" DESTINATION \"${out-path}\")")
endif()
endforeach()
get_filename_component(_name ${output-file} NAME)
set(CMAKE_CONFIGURABLE_FILE_CONTENT ${copy-commands})
configure_file(${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in
"${CMAKE_CURRENT_BINARY_DIR}/${_name}.cfr.cmake" @ONLY)
unset(CMAKE_CONFIGURABLE_FILE_CONTENT)
add_custom_command(OUTPUT ${output-file}
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/${_name}.cfr.cmake"
COMMAND ${CMAKE_COMMAND} -E touch ${output-file}
DEPENDS ${all_files}
"${CMAKE_CURRENT_BINARY_DIR}/${_name}.cfr.cmake"
COMMENT ${label})
endfunction()
......@@ -292,3 +292,97 @@ Code generated by the Protocol Buffer compiler is owned by the owner
of the input file used when generating it. This code is not
standalone and requires a support library to be linked with it. This
support library is itself covered by the above license.
========================================================================
NVD3 License
========================================================================
Copyright (c) 2011, 2012 [Novus Partners, Inc.][novus]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
https://www.novus.com/
========================================================================
D3 License
========================================================================
Copyright (c) 2012, Michael Bostock
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* The name Michael Bostock may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
========================================================================
jQuery License
========================================================================
Copyright 2013 jQuery Foundation and other contributors
http://jquery.com/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
========================================================================
jQuery UI License
========================================================================
Copyright (c) 2013 jQuery Foundation and other contributors Licensed MIT
......@@ -4,17 +4,32 @@ vtk_module_export("")
set(Apps_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(Apps_BINARY_DIR "${CMAKE_BINARY_DIR}/www/apps")
file(GLOB_RECURSE files
RELATIVE ${Apps_SOURCE_DIR}
"${Apps_SOURCE_DIR}/LiveArticles/*.*"
"${Apps_SOURCE_DIR}/WebFileViewer/*.*"
"${Apps_SOURCE_DIR}/WebVisualizer/*.*")
set (apps DataProber
LiveArticles
WebFileViewer
WebVisualizer)
foreach(_file ${files})
configure_file("${Apps_SOURCE_DIR}/${_file}" "${Apps_BINARY_DIR}/${_file}"
COPYONLY)
set (all-copy-complete)
foreach (app ${apps})
file(GLOB_RECURSE files "${Apps_SOURCE_DIR}/${app}/*.*")
set (copy-complete "${CMAKE_CURRENT_BINARY_DIR}/${app}-copy-complete")
add_custom_command(
OUTPUT "${copy-complete}"
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${Apps_SOURCE_DIR}/${app}"
"${Apps_BINARY_DIR}/${app}"
COMMAND ${CMAKE_COMMAND} -E touch ${copy-complete}
COMMENT "Copying Web Application - '${app}'"
DEPENDS ${files}
)
list(APPEND all-copy-complete "${copy-complete}")
endforeach()
add_custom_target(WebApplications ALL
DEPENDS ${all-copy-complete})
install(DIRECTORY ${Apps_BINARY_DIR}
DESTINATION ${VTK_INSTALL_LIBRARY_DIR}/www
COMPONENT Runtime)
Icon Sources
--------------------
Column-Chart-128x128.png http://www.iconspedia.com/icon/column-chart-5--.html
data-folder-icon.png http://www.iconarchive.com/show/database-icons-by-fasticon/data-folder-icon.html
Going-up-two-bars-128.png http://www.iconspedia.com/icon/going-up-two-bars-63-1.html
Window-Performance-64.png http://www.iconspedia.com/icon/window-performance-icon-37588.html
View-64.png http://www.iconspedia.com/icon/view-icon-20078.html
This diff is collapsed.
Copyright 2011 Alexander Khizha. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list
of conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution.
THIS SOFTWARE IS PROVIDED BY ALEXANDER KHIZHA ''AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ALEXANDER KHIZHA OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those of the
authors and should not be interpreted as representing official policies, either expressed
or implied, of Alexander Khizha.
\ No newline at end of file
jColumnListView
Author: Alexander Khizha <khizhaster@gmail.com>
License: BSD
Description
Simple Finder-like control that can be used instead of <select> to display hierarchical data in columns view. Supports multiselect, separate selecting and checking for items and has labels area to display selected items. Creates an <input> element for each checked item, so you can grab an array of elements on the server. Uses a separate CSS with class names prefixed with 'cvl-'.
Demo site
http://knell.ho.ua/jcvl/
Issues and Wishes
Please, feel free to contact me by e-mail (can be found in .js file) or create an issue in case you found some errors or want some features to be implemented.
Version 0.2
Splitters added for column. Now it's possible to set min and max width of columns, enable useSplitters flag and change column width with mouse dragging. Also leftMode is available, in this mode only left column will be modified.
Version 0.2.3
Added function setValues(). It allows to set up checked items with given values. This function will search for items, makes it checked and sets labels.
Version 0.2.4
Implemented single check mode. Set 'singleCheck' parameter to true and only one item can be check at one time.
Version 0.3
Implemented auto-scroll. It works in two ways:
If you click item with children and new column will not fit view area then view will be scrolled to show new column completely.
If you click item without children or empty space of column and current column does not fit view area then view will be scrolled to show current column completely.
Fixed removing of check marks for children items.
Version 0.3.1
Implemented support of values for items. Now control can read 'itemValue' attribute for <li> items in list. See updated example below. If attribute 'itemValue' is not present then text will take as value.
Removed dependency on comma (,) item's text or value. Now it's possible to set text for item with commas, and for values too. Also, it will be useful for similar items in different categories. Now you can set different values for them.
Version 0.4 (0.3.2)
Implemented 'leafMode'. If this mode enabled control will store only leaf elements (that have not any children items). Version 0.3.2 promoted to 0.4 (Today is 04.04 :)).
Version 0.4.1
From version 0.4.1 it's possible to set up format of item's text. There are three parameters to do it.
textFormat. It supports two meta tags: %cvl-text% and %cvl-children-counter%. First tag will be replaced with item's text. Second one will be replaced with children counter, obvious, heh? By default this parameter has value %cvl-text% and item will have only text. But you can add any text that you want, for example: 'Item %cvl-text% has %cvl-children-counter% item(s)'.
childrenCounterFormat. This string defines a format for children counter. This parameter supports only one meta tag %cvl-count% which will be replaced with number of children of current item. For example, you can set this format '[%cvl-count%]' and textFormat to '%cvl-children-counter% %cvl-text%' and you will get items like '[3] First Item', '[7] Another Item' or '[5] Third Item'.
emptyChildrenCounter. Flag is used when item has no children. If this parameter is true then %cvl-children-counter% tag will be rendered when children number is 0. Otherwise it will be removed. For example, suppose textFormat is '%cvl-children-counter% %cvl-text%' and childrenCounterFormat is '[ %cvl-count% ]' and our item has no children. So, if emptyChildrenCounter is true then you will get '[ 0 ] Item Text' and 'Item Text' otherwise.
You can change parameters of each column item and of whole column separately. Imagine you have created control and have variable 'cl':
// Single item
cl.getColumnList().getColumn(0).getItem(2).setChildrenCounterFormat('{%cvl-count%}');
cl.getColumnList().getColumn(1).getItem(1).setChildrenCounterFormat('=%cvl-count%=');
// Whole columns
cl.getColumnList().getColumn(0).setChildrenCounterFormat('[%cvl-count%]');
cl.getColumnList().getColumn(0).setTextFormat('%cvl-children-counter% %cvl-text%');
cl.getColumnList().getColumn(0).setEmptyChildrenCounter(true);
cl.getColumnList().getColumn(1).setChildrenCounterFormat('{ %cvl-count% }');
cl.getColumnList().getColumn(1).setTextFormat('%cvl-text% %cvl-children-counter%');
And, of course, you can change tags! It stored in global object jCVL_ColumnItemTags and by default it looks like:
var jCVL_ColumnItemTags = {
'text': '%cvl-text%',
'childrenCounter': '%cvl-children-counter%',
'childrenNumber': '%cvl-count%'
};
So, you can simply do the following:
jCVL_ColumnItemTags.text = '$my-text-tag$';
jCVL_ColumnItemTags.childrenCounter = '$my-kids-counter$';
columnItem.setTextFormat('Item: $my-text-tag$ $my-kids-counter$');
// Items will be update automatically
Note. Take in mind that global tag's object is used by all jColumnListView controls, so your changes will affect all control instances and probably you will need to update formats everywhere.
Version 0.4.2
Implemented visual indicator for items with children. There are two parameters childIndicator and childIndicatorTextFormat. First parameter specifies to show or not children indicator. Second parameter defines a format for text in indicator. If second parameter is null text will not be rendered. This format supports only one tag %cvl-count%. See new screenshots below.
Added two CSS classes: cvl-column-item-indicator and cvl-column-item-indicator-selected. Use these classes to customize your indicator. Structure of text label with indicator element:
<span class="cvl-column-item-label">
<span>Motherboards</span>
<div class="cvl-column-item-indicator"></div>
</span>
Functions for operate on text formats (0.4.1) and children indicator (0.4.2) implemented for Item, Column and ColumnList. You can easily change look of control:
// List
cl.getColumnList().setChildIndicator(false)
// Column
cl.getColumnList().getColumn(0).setChildIndicator(true)
cl.getColumnList().getColumn(0).setChildIndicatorTextFormat('A')
// Item
cl.getColumnList().getColumn(0).getItem(2).setChildIndicatorTextFormat('(%cvl-count%)')
cl.getColumnList().getColumn(0).getItem(3).setChildIndicatorTextFormat('[%cvl-count%]')
Version 0.5.0
Basic AJAX support. Added ajaxSource option to configure AJAX request and setFromURL() to load data in list by URL. ajaxSource objects contains of following parameters:
url - URL to get data. By default is null. See notes below.
method - 'GET' or 'POST'.
dataType - Type of data from URL. See notes below.
waiterClass - class name for waiter element (e.g., load spinner). See CSS file for example.
onSuccess - callback to be called when data retrieved successfuly and after this data setted to list.
onFailure - callback to be called when some errors occured during request.
Both of callbacks has the same signature:
function onSuccess(reqObj, respStatus, respData)
function onFailure(reqObj, respStatus, errObj)
where reqObj is an XMLHttpRequest, respStatus is a text status, respData is a data object with required type, errObj is an error object. (See jQuery.ajax() for more details about dataType and callbacks).
New setFromURL() function of jCVL_ColumnListView object. When you create a list view object you can leave ajaxSource.url field empty (null). Control will be constructed without any data, but required parameters for AJAX will be ready for use (method, callbacks, etc). Later you just call to setFromURL(data_url) and your control will be filled with data.
Notes. Now only whole list update is supported. Request must returns simple HTML fragment with <UL> list like example below. Control will parse this list and set data. Separate URLs and URL parameters for columns and items, different data types (e.g. JSON, text, etc) will be supported in future versions of 0.5.x branch.
/*
* Text labels (Jaws)
*/
/* Label element */
.cvl-selected-label
{
padding: 4px 2px;
margin: 2px;
background-color: #1F75A8;
border: 1px solid #1F75A8;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
-o-border-radius: 4px;
-ms-border-radius: 4px;
float: left;
}
.cvl-selected-label:hover
{
box-shadow: 2px 2px 3px #bbb;
-moz-box-shadow: 2px 2px 3px #bbb;
-webkit-box-shadow: 2px 2px 3px #bbb;
-o-box-shadow: 2px 2px 3px #bbb;
-ms-box-shadow: 2px 2px 3px #bbb;
}
/* Label Del element (x) */
.cvl-selected-label .cvl-selected-del
{
float: left;
color: #ffffff;
font-weight: bold;
font-family: Verdana;
font-size: 11px;
width: 14px;
padding: 1px 0;
margin: 0;
margin-right: 2px;
border-right: 1px solid #ffffff;
text-align: center;
cursor: pointer;
}
/* Label text */
.cvl-selected-label .cvl-selected-name
{
float: left;
padding: 0 4px 0 2px;
margin: 0;
color: #ffffff;
font-family: 'Segoe UI', 'Trebuchet MS', Arial, Helvetica, sans-serif;
font-size: 12px;
cursor: pointer;
}
/*
* Area with labels
*/
/* Area box */
.cvl-label-area
{
border: 1px solid #1F75A8;
padding: 2px;
background-color: #ffffff;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-o-border-radius: 5px;
-ms-border-radius: 5px;
overflow: hidden;
}
/*
* Item of list column
*/
/* Column Item box */
.cvl-column-item
{
padding: 2px 4px;
margin: 0;
margin-bottom: 2px;
background-color: #ffffff;
cursor: pointer;
overflow: hidden;
clear: both;
border-color: #ffffff;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-o-border-radius: 5px;
-ms-border-radius: 5px;
}
/* Selected column item */
.cvl-column-item-selected
{
background-color: #15618E !important;
color: #ffffff;
}
/* Highlight item on mouseover */
.cvl-column-item:hover
{
background-color: #E4F4FC;
}
/* Box for item's checkbox */
.cvl-column-item .cvl-column-item-checkbox-box
{
width: 14px;
height: 12px;
margin: 0px;
padding: 2px 0;
float: left;
}
/* Item's checkox */
.cvl-column-item .cvl-column-item-checkbox
{
margin: 0;
padding: 0;
float: left;
}
/* Column item's label */
.cvl-column-item .cvl-column-item-label
{
font-size: 12px;
font-family: Verdana;
display: block;
margin-left: 20px;
}
.cvl-column-item-indicator
{
float: right;
width: 10px;
height: 10px;
margin: 3px 2px;
background-color: #15618E;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-o-border-radius: 5px;
-ms-border-radius: 5px;
}
.cvl-column-item-indicator-selected
{
background-color: #fff !important;
}
/* Example for text indicator
.cvl-column-item-indicator
{
float: right;
width: 10px;
height: 16px;
margin: 0 2px;
color: #15618E;
font-size: 10px;
line-height: 16px;
font-weight: bold;
}
.cvl-column-item-indicator-selected
{
color: #fff !important;
}
*/
/*
* Column Waiter
*/
.cvl-column-waiter
{
float: left;
width: 32px;
height: 32px;
background-image: url(columnwaiter.gif);
background-repeat: no-repeat;
}
/*
* Column
*/
.cvl-column
{
float: left;
overflow: auto;
padding: 4px;
border: 1px solid #000;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
-o-border-radius: 4px;
-ms-border-radius: 4px;
}
/*
* Column Separator
*/
.cvl-column-splitter
{
float: left;
margin: 0 2px;
background-color: #777;
min-width: 3px;
cursor: col-resize;
}
.cvl-column-splitter-active
{
background-color: #999 !important;
}
/*
* Column List
*/
.cvl-column-list
{
overflow: hidden;
clear: both;
margin-bottom: 10px;
}
.cvl-column-list-view
{
}
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<title>Test page</title>
<link rel="stylesheet" href="cvl.css"/>
<style type="text/css">
body {
font-family: Verdana;
}
</style>
<script
type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js">
</script>
<script type="text/javascript" src="cvl.js"></script>
<script type="text/javascript">
var cl;
jQuery(document).ready(function () {
cl = jQuery.fn.jColumnListView({
id: 'cl1',
width: 400,
columnWidth: 150,
columnHeight: 200,
columnMargin: 8,
paramName: 'columnview',
columnNum: 4,
appendToId: 't1',
elementId: 'categories',
removeAfter: false,
columnMinWidth: 120,
columnMaxWidth: 200,
childIndicator: true,
leafMode: true,
onItemChecked: function (ci) { console.log(ci); },
onItemUnchecked: function (ci) { console.log(ci); }
});
jQuery.fn.jColumnListView({
id: 'cl2',
columnWidth: 120,
columnHeight: 180,
columnMargin: 5,
paramName: 'cview',
columnNum: 3,
appendToId: 't2',
elementId: 'categories',
removeAfter: true,
showLabels: false,
useSplitters: false,
checkAndClick: true,
textFormat: '%cvl-children-counter% %cvl-text%',
childrenCounterFormat: '[%cvl-count%]',
emptyChildrenCounter: false,
childIndicator: true
});
$('#t1-lmode').change(function () {
cl.getColumnList().setSplitterLeftMode($('#t1-lmode').is(':checked'));
});
});
</script>
</head>
<body>