Merge branch 'develop' into NIFI-169

This commit is contained in:
joewitt 2014-12-16 12:53:40 -05:00
commit a94cf4be4b
158 changed files with 8424 additions and 43091 deletions

View File

@ -24,15 +24,15 @@
${nf.bulletin.board.style.tags}
<link rel="stylesheet" href="js/jquery/combo/jquery.combo.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/modal/jquery.modal.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/css/smoothness/jquery-ui-1.8.10.custom.css" type="text/css" />
<script type="text/javascript" src="js/jquery/jquery-1.7.min.js"></script>
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.min.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css" type="text/css" />
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
<script type="text/javascript" src="js/jquery/combo/jquery.combo.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/modal/jquery.modal.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/jquery.ellipsis.js"></script>
<script type="text/javascript" src="js/jquery/jquery.each.js"></script>
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript" src="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js"></script>
<script type="text/javascript" src="js/jquery/qtip2/jquery.qtip.min.js"></script>
<script type="text/javascript" src="js/nf/nf-namespace.js?${project.version}"></script>
${nf.bulletin.board.script.tags}

View File

@ -28,16 +28,14 @@
<link rel="stylesheet" href="js/jquery/tabbs/jquery.tabbs.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/combo/jquery.combo.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/modal/jquery.modal.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/css/smoothness/jquery-ui-1.8.10.custom.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.min.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/minicolors/jquery.minicolors.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
<script type="text/javascript" src="js/codemirror/lib/codemirror.js"></script>
<script type="text/javascript" src="js/codemirror/addon/edit/matchbrackets.js"></script>
<script type="text/javascript" src="js/codemirror/addon/hint/show-hint.js"></script>
<script type="text/javascript" src="js/jquery/jquery-1.7.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript" src="js/codemirror/lib/codemirror-compressed.js"></script>
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
<script type="text/javascript" src="js/jquery/jquery.count.js"></script>
<script type="text/javascript" src="js/jquery/jquery.ellipsis.js"></script>
@ -48,7 +46,7 @@
<script type="text/javascript" src="js/jquery/modal/jquery.modal.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/minicolors/jquery.minicolors.min.js"></script>
<script type="text/javascript" src="js/jquery/qtip2/jquery.qtip.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.event.drag-2.0.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.event.drag-2.2.min.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.cellrangeselector.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.cellselectionmodel.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.js"></script>

View File

@ -24,19 +24,19 @@
${nf.cluster.style.tags}
<link rel="stylesheet" href="js/jquery/combo/jquery.combo.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/modal/jquery.modal.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/css/smoothness/jquery-ui-1.8.10.custom.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.min.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
<script type="text/javascript" src="js/jquery/jquery-1.7.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
<script type="text/javascript" src="js/jquery/combo/jquery.combo.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/modal/jquery.modal.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/jquery.ellipsis.js"></script>
<script type="text/javascript" src="js/jquery/jquery.each.js"></script>
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript" src="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js"></script>
<script type="text/javascript" src="js/jquery/qtip2/jquery.qtip.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.event.drag-2.0.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.event.drag-2.2.min.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.cellrangeselector.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.cellselectionmodel.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.js"></script>

View File

@ -24,19 +24,19 @@
${nf.counters.style.tags}
<link rel="stylesheet" href="js/jquery/combo/jquery.combo.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/modal/jquery.modal.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/css/smoothness/jquery-ui-1.8.10.custom.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.min.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
<script type="text/javascript" src="js/jquery/jquery-1.7.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
<script type="text/javascript" src="js/jquery/combo/jquery.combo.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/modal/jquery.modal.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/jquery.ellipsis.js"></script>
<script type="text/javascript" src="js/jquery/jquery.each.js"></script>
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript" src="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js"></script>
<script type="text/javascript" src="js/jquery/qtip2/jquery.qtip.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.event.drag-2.0.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.event.drag-2.2.min.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.cellrangeselector.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.cellselectionmodel.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.js"></script>

View File

@ -24,19 +24,19 @@
${nf.history.style.tags}
<link rel="stylesheet" href="js/jquery/combo/jquery.combo.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/modal/jquery.modal.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/css/smoothness/jquery-ui-1.8.10.custom.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.min.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
<script type="text/javascript" src="js/jquery/jquery-1.7.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
<script type="text/javascript" src="js/jquery/modal/jquery.modal.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/combo/jquery.combo.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/jquery.ellipsis.js"></script>
<script type="text/javascript" src="js/jquery/jquery.each.js"></script>
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript" src="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js"></script>
<script type="text/javascript" src="js/jquery/qtip2/jquery.qtip.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.event.drag-2.0.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.event.drag-2.2.min.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.cellrangeselector.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.cellselectionmodel.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.js"></script>

View File

@ -25,20 +25,20 @@
<link rel="stylesheet" href="js/jquery/tabbs/jquery.tabbs.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/combo/jquery.combo.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/modal/jquery.modal.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/css/smoothness/jquery-ui-1.8.10.custom.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.min.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
<script type="text/javascript" src="js/jquery/jquery-1.7.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
<script type="text/javascript" src="js/jquery/modal/jquery.modal.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/tabbs/jquery.tabbs.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/combo/jquery.combo.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/jquery.ellipsis.js"></script>
<script type="text/javascript" src="js/jquery/jquery.each.js"></script>
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript" src="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js"></script>
<script type="text/javascript" src="js/jquery/qtip2/jquery.qtip.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.event.drag-2.0.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.event.drag-2.2.min.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.cellrangeselector.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.cellselectionmodel.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.js"></script>

View File

@ -25,12 +25,12 @@
<link rel="stylesheet" href="js/jquery/tabbs/jquery.tabbs.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/combo/jquery.combo.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/modal/jquery.modal.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/css/smoothness/jquery-ui-1.8.10.custom.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.min.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
<script type="text/javascript" src="js/jquery/jquery-1.7.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
<script type="text/javascript" src="js/jquery/tabbs/jquery.tabbs.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/combo/jquery.combo.js?${project.version}"></script>
@ -38,7 +38,7 @@
<script type="text/javascript" src="js/jquery/jquery.ellipsis.js"></script>
<script type="text/javascript" src="js/jquery/jquery.each.js"></script>
<script type="text/javascript" src="js/jquery/qtip2/jquery.qtip.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.event.drag-2.0.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.event.drag-2.2.min.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.cellrangeselector.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.cellselectionmodel.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.js"></script>

View File

@ -24,20 +24,20 @@
${nf.templates.style.tags}
<link rel="stylesheet" href="js/jquery/combo/jquery.combo.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/modal/jquery.modal.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/css/smoothness/jquery-ui-1.8.10.custom.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.min.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
<script type="text/javascript" src="js/jquery/jquery-1.7.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
<script type="text/javascript" src="js/jquery/jquery.form.js"></script>
<script type="text/javascript" src="js/jquery/jquery.form.min.js"></script>
<script type="text/javascript" src="js/jquery/combo/jquery.combo.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/modal/jquery.modal.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/jquery.ellipsis.js"></script>
<script type="text/javascript" src="js/jquery/jquery.each.js"></script>
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript" src="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js"></script>
<script type="text/javascript" src="js/jquery/qtip2/jquery.qtip.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.event.drag-2.0.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.event.drag-2.2.min.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.cellrangeselector.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.cellselectionmodel.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.js"></script>

View File

@ -25,20 +25,20 @@
<link rel="stylesheet" href="js/jquery/tabbs/jquery.tabbs.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/combo/jquery.combo.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/modal/jquery.modal.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/css/smoothness/jquery-ui-1.8.10.custom.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.min.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
<script type="text/javascript" src="js/jquery/jquery-1.7.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.center.js"></script>
<script type="text/javascript" src="js/jquery/tabbs/jquery.tabbs.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/combo/jquery.combo.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/modal/jquery.modal.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/jquery.ellipsis.js"></script>
<script type="text/javascript" src="js/jquery/jquery.each.js"></script>
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript" src="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js"></script>
<script type="text/javascript" src="js/jquery/qtip2/jquery.qtip.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.event.drag-2.0.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.event.drag-2.2.min.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.cellrangeselector.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.cellselectionmodel.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.js"></script>

View File

@ -53,3 +53,4 @@
</ul>
</div>
</div>
<div id="search-flow-results"></div>

View File

@ -79,3 +79,4 @@
</div>
</div>
</div>
<div id="search-users-results"></div>

View File

@ -21,3 +21,4 @@
<div id="cluster-search-example">(e.g.&nbsp;my.host:80)</div>
</div>
</div>
<div id="search-cluster-results"></div>

View File

@ -451,34 +451,41 @@ input.search-flow {
color: #7098AD;
}
li.search-header {
#search-flow-results .ui-autocomplete {
max-height: 400px;
overflow: auto;
border: 1px solid #aaaaaa;
z-index: 1251;
border-radius: 0;
}
#search-flow-results .ui-menu .ui-menu-item a.ui-state-focus {
background: #D4E0E5 !important;
border: 1px solid #999999;
border-radius: 0;
}
#search-flow-results li.search-header {
font-weight: bold;
padding-top: 4px;
padding-left: 4px;
padding-right: 4px;
height: 14px;
float: left;
clear: left;
}
.ui-autocomplete {
max-height: 400px;
overflow: auto;
}
div.search-match-header {
#search-flow-results div.search-match-header {
font-weight: normal;
margin-left: 19px;
}
div.search-match {
#search-flow-results div.search-match {
margin-left: 26px;
color: #888;
font-size: 10px;
line-height: 1.4em;
}
li.search-no-matches {
#search-flow-results li.search-no-matches {
padding: 4px;
font-weight: bold;
color: #aaa;

View File

@ -110,14 +110,26 @@ input.search-users {
color: #888;
}
#search-users-results .ui-autocomplete {
max-height: 300px;
overflow: auto;
border: 1px solid #aaaaaa;
z-index: 1351;
border-radius: 0;
}
#search-users-results .ui-menu .ui-menu-item a.ui-state-focus {
background: #D4E0E5 !important;
border: 1px solid #999999;
border-radius: 0;
}
li.search-users-header {
font-weight: bold;
padding-top: 4px;
padding-left: 4px;
padding-right: 4px;
height: 14px;
float: left;
clear: left;
}
div.search-users-match-header {

View File

@ -145,6 +145,12 @@ div.relationship-description {
margin-top: 5px;
}
#run-duration-slider .ui-slider-handle {
border-radius: 0;
border: 1px solid #999;
outline: none;
}
#run-duration-labels {
font-family: sans-serif;
}

View File

@ -139,9 +139,18 @@ div.search-match {
font-size: 10px;
}
.ui-autocomplete {
#search-cluster-results .ui-autocomplete {
max-height: 300px;
overflow: auto;
border: 1px solid #aaaaaa;
z-index: 1351;
border-radius: 0;
}
#search-cluster-results .ui-menu .ui-menu-item a.ui-state-focus {
background: #D4E0E5 !important;
border: 1px solid #999999;
border-radius: 0;
}
input.search-nodes {

View File

@ -1,4 +1,4 @@
Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com> and others
Copyright (C) 2014 by Marijn Haverbeke <marijnh@gmail.com> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,125 +0,0 @@
(function (mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function (CodeMirror) {
var ie_lt8 = /MSIE \d/.test(navigator.userAgent) &&
(document.documentMode == null || document.documentMode < 8);
var Pos = CodeMirror.Pos;
var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"};
function findMatchingBracket(cm, where, strict, config) {
var line = cm.getLineHandle(where.line), pos = where.ch - 1;
var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)];
if (!match)
return null;
var dir = match.charAt(1) == ">" ? 1 : -1;
if (strict && (dir > 0) != (pos == where.ch))
return null;
var style = cm.getTokenTypeAt(Pos(where.line, pos + 1));
var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style || null, config);
return {from: Pos(where.line, pos), to: found && found.pos,
match: found && found.ch == match.charAt(0), forward: dir > 0};
}
function scanForBracket(cm, where, dir, style, config) {
var maxScanLen = (config && config.maxScanLineLength) || 10000;
var maxScanLines = (config && config.maxScanLines) || 500;
var stack = [], re = /[(){}[\]]/;
var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)
: Math.max(cm.firstLine() - 1, where.line - maxScanLines);
for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {
var line = cm.getLine(lineNo);
if (!line)
continue;
var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;
if (line.length > maxScanLen)
continue;
if (lineNo == where.line)
pos = where.ch - (dir < 0 ? 1 : 0);
for (; pos != end; pos += dir) {
var ch = line.charAt(pos);
if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {
var match = matching[ch];
if ((match.charAt(1) == ">") == (dir > 0))
stack.push(ch);
else if (!stack.length)
return {pos: Pos(lineNo, pos), ch: ch};
else
stack.pop();
}
}
}
}
function matchBrackets(cm, autoclear, config) {
// Disable brace matching in long lines, since it'll cause hugely slow updates
var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000;
var marks = [], ranges = cm.listSelections();
for (var i = 0; i < ranges.length; i++) {
var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, false, config);
if (match && cm.getLine(match.from.line).length <= maxHighlightLen &&
match.to && cm.getLine(match.to.line).length <= maxHighlightLen) {
var style = match.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {className: style}));
if (match.to)
marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {className: style}));
}
}
if (marks.length) {
// Kludge to work around the IE bug from issue #1193, where text
// input stops going to the textare whever this fires.
if (ie_lt8 && cm.state.focused)
cm.display.input.focus();
var clear = function () {
cm.operation(function () {
for (var i = 0; i < marks.length; i++)
marks[i].clear();
});
};
if (autoclear)
setTimeout(clear, 800);
else
return clear;
}
}
var currentlyHighlighted = null;
function doMatchBrackets(cm) {
cm.operation(function () {
if (currentlyHighlighted) {
currentlyHighlighted();
currentlyHighlighted = null;
}
currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets);
});
}
CodeMirror.defineOption("matchBrackets", false, function (cm, val, old) {
if (old && old != CodeMirror.Init)
cm.off("cursorActivity", doMatchBrackets);
if (val) {
cm.state.matchBrackets = typeof val == "object" ? val : {};
cm.on("cursorActivity", doMatchBrackets);
}
});
CodeMirror.defineExtension("matchBrackets", function () {
matchBrackets(this, true);
});
CodeMirror.defineExtension("findMatchingBracket", function (pos, strict) {
return findMatchingBracket(this, pos, strict);
});
CodeMirror.defineExtension("scanForBracket", function (pos, dir, style) {
return scanForBracket(this, pos, dir, style);
});
});

View File

@ -1,38 +1,38 @@
.CodeMirror-hints {
position: absolute;
z-index: 10;
overflow: hidden;
list-style: none;
position: absolute;
z-index: 10;
overflow: hidden;
list-style: none;
margin: 0;
padding: 2px;
margin: 0;
padding: 2px;
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
border-radius: 3px;
border: 1px solid silver;
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
border-radius: 3px;
border: 1px solid silver;
background: white;
font-size: 90%;
font-family: monospace;
background: white;
font-size: 90%;
font-family: monospace;
max-height: 20em;
overflow-y: auto;
max-height: 20em;
overflow-y: auto;
}
.CodeMirror-hint {
margin: 0;
padding: 0 4px;
border-radius: 2px;
max-width: 19em;
overflow: hidden;
white-space: pre;
color: black;
cursor: pointer;
margin: 0;
padding: 0 4px;
border-radius: 2px;
max-width: 19em;
overflow: hidden;
white-space: pre;
color: black;
cursor: pointer;
}
.CodeMirror-hint-active {
background: #08f;
color: white;
li.CodeMirror-hint-active {
background: #08f;
color: white;
}

View File

@ -1,411 +0,0 @@
(function (mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function (CodeMirror) {
"use strict";
var HINT_ELEMENT_CLASS = "CodeMirror-hint";
var ACTIVE_HINT_ELEMENT_CLASS = "CodeMirror-hint-active";
CodeMirror.showHint = function (cm, getHints, options) {
// We want a single cursor position.
if (cm.listSelections().length > 1 || cm.somethingSelected())
return;
if (getHints == null) {
if (options && options.async)
return;
else
getHints = CodeMirror.hint.auto;
}
if (cm.state.completionActive)
cm.state.completionActive.close();
var completion = cm.state.completionActive = new Completion(cm, getHints, options || {});
CodeMirror.signal(cm, "startCompletion", cm);
if (completion.options.async)
getHints(cm, function (hints) {
completion.showHints(hints);
}, completion.options);
else
return completion.showHints(getHints(cm, completion.options));
};
function Completion(cm, getHints, options) {
this.cm = cm;
this.getHints = getHints;
this.options = options;
this.widget = this.onClose = null;
}
Completion.prototype = {
close: function () {
if (!this.active())
return;
this.cm.state.completionActive = null;
if (this.widget)
this.widget.close();
if (this.onClose)
this.onClose();
CodeMirror.signal(this.cm, "endCompletion", this.cm);
},
active: function () {
return this.cm.state.completionActive == this;
},
pick: function (data, i) {
var completion = data.list[i];
if (completion.hint)
completion.hint(this.cm, data, completion);
else
this.cm.replaceRange(getText(completion), completion.from || data.from, completion.to || data.to);
CodeMirror.signal(data, "pick", completion);
this.close();
},
showHints: function (data) {
if (!data || !data.list.length || !this.active())
return this.close();
if (this.options.completeSingle != false && data.list.length == 1)
this.pick(data, 0);
else
this.showWidget(data);
},
showWidget: function (data) {
this.widget = new Widget(this, data);
CodeMirror.signal(data, "shown");
var debounce = 0, completion = this, finished;
var closeOn = this.options.closeCharacters || /[\s()\[\]{};:>,]/;
var startPos = this.cm.getCursor(), startLen = this.cm.getLine(startPos.line).length;
var requestAnimationFrame = window.requestAnimationFrame || function (fn) {
return setTimeout(fn, 1000 / 60);
};
var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout;
function done() {
if (finished)
return;
finished = true;
completion.close();
completion.cm.off("cursorActivity", activity);
if (data)
CodeMirror.signal(data, "close");
}
function update() {
if (finished)
return;
CodeMirror.signal(data, "update");
if (completion.options.async)
completion.getHints(completion.cm, finishUpdate, completion.options);
else
finishUpdate(completion.getHints(completion.cm, completion.options));
}
function finishUpdate(data_) {
data = data_;
if (finished)
return;
if (!data || !data.list.length)
return done();
completion.widget = new Widget(completion, data);
}
function clearDebounce() {
if (debounce) {
cancelAnimationFrame(debounce);
debounce = 0;
}
}
function activity() {
clearDebounce();
var pos = completion.cm.getCursor(), line = completion.cm.getLine(pos.line);
if (pos.line != startPos.line || line.length - pos.ch != startLen - startPos.ch ||
pos.ch < startPos.ch || completion.cm.somethingSelected() ||
(pos.ch && closeOn.test(line.charAt(pos.ch - 1)))) {
completion.close();
} else {
debounce = requestAnimationFrame(update);
if (completion.widget)
completion.widget.close();
}
}
this.cm.on("cursorActivity", activity);
this.onClose = done;
}
};
function getText(completion) {
if (typeof completion == "string")
return completion;
else
return completion.text;
}
function buildKeyMap(options, handle) {
var baseMap = {
Up: function () {
handle.moveFocus(-1);
},
Down: function () {
handle.moveFocus(1);
},
PageUp: function () {
handle.moveFocus(-handle.menuSize() + 1, true);
},
PageDown: function () {
handle.moveFocus(handle.menuSize() - 1, true);
},
Home: function () {
handle.setFocus(0);
},
End: function () {
handle.setFocus(handle.length - 1);
},
Enter: handle.pick,
Tab: handle.pick,
Esc: handle.close
};
var ourMap = options.customKeys ? {} : baseMap;
function addBinding(key, val) {
var bound;
if (typeof val != "string")
bound = function (cm) {
return val(cm, handle);
};
// This mechanism is deprecated
else if (baseMap.hasOwnProperty(val))
bound = baseMap[val];
else
bound = val;
ourMap[key] = bound;
}
if (options.customKeys)
for (var key in options.customKeys)
if (options.customKeys.hasOwnProperty(key))
addBinding(key, options.customKeys[key]);
if (options.extraKeys)
for (var key in options.extraKeys)
if (options.extraKeys.hasOwnProperty(key))
addBinding(key, options.extraKeys[key]);
return ourMap;
}
function getHintElement(hintsElement, el) {
while (el && el != hintsElement) {
if (el.nodeName.toUpperCase() === "LI" && el.parentNode == hintsElement)
return el;
el = el.parentNode;
}
}
function Widget(completion, data) {
this.completion = completion;
this.data = data;
var widget = this, cm = completion.cm, options = completion.options;
var hints = this.hints = document.createElement("ul");
hints.className = "CodeMirror-hints";
this.selectedHint = options.getDefaultSelection ? options.getDefaultSelection(cm, options, data) : 0;
var completions = data.list;
for (var i = 0; i < completions.length; ++i) {
var elt = hints.appendChild(document.createElement("li")), cur = completions[i];
var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? "" : " " + ACTIVE_HINT_ELEMENT_CLASS);
if (cur.className != null)
className = cur.className + " " + className;
elt.className = className;
if (cur.render)
cur.render(elt, data, cur);
else
elt.appendChild(document.createTextNode(cur.displayText || getText(cur)));
elt.hintId = i;
}
var pos = cm.cursorCoords(options.alignWithWord !== false ? data.from : null);
var left = pos.left, top = pos.bottom, below = true;
hints.style.left = left + "px";
hints.style.top = top + "px";
// If we're at the edge of the screen, then we want the menu to appear on the left of the cursor.
var winW = window.innerWidth || Math.max(document.body.offsetWidth, document.documentElement.offsetWidth);
var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight);
(options.container || document.body).appendChild(hints);
var box = hints.getBoundingClientRect(), overlapY = box.bottom - winH;
if (overlapY > 0) {
var height = box.bottom - box.top, curTop = box.top - (pos.bottom - pos.top);
if (curTop - height > 0) { // Fits above cursor
hints.style.top = (top = curTop - height) + "px";
below = false;
} else if (height > winH) {
hints.style.height = (winH - 5) + "px";
hints.style.top = (top = pos.bottom - box.top) + "px";
var cursor = cm.getCursor();
if (data.from.ch != cursor.ch) {
pos = cm.cursorCoords(cursor);
hints.style.left = (left = pos.left) + "px";
box = hints.getBoundingClientRect();
}
}
}
var overlapX = box.left - winW;
if (overlapX > 0) {
if (box.right - box.left > winW) {
hints.style.width = (winW - 5) + "px";
overlapX -= (box.right - box.left) - winW;
}
hints.style.left = (left = pos.left - overlapX) + "px";
}
cm.addKeyMap(this.keyMap = buildKeyMap(options, {
moveFocus: function (n, avoidWrap) {
widget.changeActive(widget.selectedHint + n, avoidWrap);
},
setFocus: function (n) {
widget.changeActive(n);
},
menuSize: function () {
return widget.screenAmount();
},
length: completions.length,
close: function () {
completion.close();
},
pick: function () {
widget.pick();
},
data: data
}));
if (options.closeOnUnfocus !== false) {
var closingOnBlur;
cm.on("blur", this.onBlur = function () {
closingOnBlur = setTimeout(function () {
completion.close();
}, 100);
});
cm.on("focus", this.onFocus = function () {
clearTimeout(closingOnBlur);
});
}
var startScroll = cm.getScrollInfo();
cm.on("scroll", this.onScroll = function () {
var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().getBoundingClientRect();
var newTop = top + startScroll.top - curScroll.top;
var point = newTop - (window.pageYOffset || (document.documentElement || document.body).scrollTop);
if (!below)
point += hints.offsetHeight;
if (point <= editor.top || point >= editor.bottom)
return completion.close();
hints.style.top = newTop + "px";
hints.style.left = (left + startScroll.left - curScroll.left) + "px";
});
CodeMirror.on(hints, "dblclick", function (e) {
var t = getHintElement(hints, e.target || e.srcElement);
if (t && t.hintId != null) {
widget.changeActive(t.hintId);
widget.pick();
}
});
CodeMirror.on(hints, "click", function (e) {
var t = getHintElement(hints, e.target || e.srcElement);
if (t && t.hintId != null) {
widget.changeActive(t.hintId);
if (options.completeOnSingleClick)
widget.pick();
}
});
CodeMirror.on(hints, "mousedown", function () {
setTimeout(function () {
cm.focus();
}, 20);
});
CodeMirror.signal(data, "select", completions[0], hints.firstChild);
return true;
}
Widget.prototype = {
close: function () {
if (this.completion.widget != this)
return;
this.completion.widget = null;
this.hints.parentNode.removeChild(this.hints);
this.completion.cm.removeKeyMap(this.keyMap);
var cm = this.completion.cm;
if (this.completion.options.closeOnUnfocus !== false) {
cm.off("blur", this.onBlur);
cm.off("focus", this.onFocus);
}
cm.off("scroll", this.onScroll);
},
pick: function () {
this.completion.pick(this.data, this.selectedHint);
},
changeActive: function (i, avoidWrap) {
if (i >= this.data.list.length)
i = avoidWrap ? this.data.list.length - 1 : 0;
else if (i < 0)
i = avoidWrap ? 0 : this.data.list.length - 1;
if (this.selectedHint == i)
return;
var node = this.hints.childNodes[this.selectedHint];
node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
node = this.hints.childNodes[this.selectedHint = i];
node.className += " " + ACTIVE_HINT_ELEMENT_CLASS;
if (node.offsetTop < this.hints.scrollTop)
this.hints.scrollTop = node.offsetTop - 3;
else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight)
this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3;
CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node);
},
screenAmount: function () {
return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1;
}
};
CodeMirror.registerHelper("hint", "auto", function (cm, options) {
var helpers = cm.getHelpers(cm.getCursor(), "hint"), words;
if (helpers.length) {
for (var i = 0; i < helpers.length; i++) {
var cur = helpers[i](cm, options);
if (cur && cur.list.length)
return cur;
}
} else if (words = cm.getHelper(cm.getCursor(), "hintWords")) {
if (words)
return CodeMirror.hint.fromList(cm, {words: words});
} else if (CodeMirror.hint.anyword) {
return CodeMirror.hint.anyword(cm, options);
}
});
CodeMirror.registerHelper("hint", "fromList", function (cm, options) {
var cur = cm.getCursor(), token = cm.getTokenAt(cur);
var found = [];
for (var i = 0; i < options.words.length; i++) {
var word = options.words[i];
if (word.slice(0, token.string.length) == token.string)
found.push(word);
}
if (found.length)
return {
list: found,
from: CodeMirror.Pos(cur.line, token.start),
to: CodeMirror.Pos(cur.line, token.end)
};
});
CodeMirror.commands.autocomplete = CodeMirror.showHint;
});

File diff suppressed because one or more lines are too long

View File

@ -1,67 +1,97 @@
/* BASICS */
.CodeMirror {
/* Set height, width, borders, and global font properties here */
font-family: monospace;
height: 300px;
/* Set height, width, borders, and global font properties here */
font-family: monospace;
height: 300px;
}
.CodeMirror-scroll {
/* Set scrolling behaviour here */
overflow: auto;
/* Set scrolling behaviour here */
overflow: auto;
}
/* PADDING */
.CodeMirror-lines {
padding: 4px 0; /* Vertical padding around content */
padding: 4px 0; /* Vertical padding around content */
}
.CodeMirror pre {
padding: 0 4px; /* Horizontal padding of content */
padding: 0 4px; /* Horizontal padding of content */
}
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
background-color: white; /* The little square between H and V scrollbars */
background-color: white; /* The little square between H and V scrollbars */
}
/* GUTTER */
.CodeMirror-gutters {
border-right: 1px solid #ddd;
background-color: #f7f7f7;
white-space: nowrap;
border-right: 1px solid #ddd;
background-color: #f7f7f7;
white-space: nowrap;
}
.CodeMirror-linenumbers {}
.CodeMirror-linenumber {
padding: 0 3px 0 5px;
min-width: 20px;
text-align: right;
color: #999;
-moz-box-sizing: content-box;
box-sizing: content-box;
padding: 0 3px 0 5px;
min-width: 20px;
text-align: right;
color: #999;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.CodeMirror-guttermarker { color: black; }
.CodeMirror-guttermarker-subtle { color: #999; }
/* CURSOR */
.CodeMirror div.CodeMirror-cursor {
border-left: 1px solid black;
border-left: 1px solid black;
}
/* Shown when moving in bi-directional text */
.CodeMirror div.CodeMirror-secondarycursor {
border-left: 1px solid silver;
border-left: 1px solid silver;
}
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
width: auto;
border: 0;
background: #7e7;
.CodeMirror.cm-fat-cursor div.CodeMirror-cursor {
width: auto;
border: 0;
background: #7e7;
}
.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {
z-index: 1;
}
.cm-animate-fat-cursor {
width: auto;
border: 0;
-webkit-animation: blink 1.06s steps(1) infinite;
-moz-animation: blink 1.06s steps(1) infinite;
animation: blink 1.06s steps(1) infinite;
}
@-moz-keyframes blink {
0% { background: #7e7; }
50% { background: none; }
100% { background: #7e7; }
}
@-webkit-keyframes blink {
0% { background: #7e7; }
50% { background: none; }
100% { background: #7e7; }
}
@keyframes blink {
0% { background: #7e7; }
50% { background: none; }
100% { background: #7e7; }
}
/* Can style cursor different in overwrite (non-insert) mode */
div.CodeMirror-overwrite div.CodeMirror-cursor {}
.cm-tab { display: inline-block; }
.cm-tab { display: inline-block; text-decoration: inherit; }
.CodeMirror-ruler {
border-left: 1px solid #ccc;
position: absolute;
border-left: 1px solid #ccc;
position: absolute;
}
/* DEFAULT THEME */
@ -70,11 +100,12 @@ div.CodeMirror-overwrite div.CodeMirror-cursor {}
.cm-s-default .cm-atom {color: #219;}
.cm-s-default .cm-number {color: #164;}
.cm-s-default .cm-def {color: #00f;}
.cm-s-default .cm-variable {color: black;}
.cm-s-default .cm-variable,
.cm-s-default .cm-punctuation,
.cm-s-default .cm-property,
.cm-s-default .cm-operator {}
.cm-s-default .cm-variable-2 {color: #05a;}
.cm-s-default .cm-variable-3 {color: #085;}
.cm-s-default .cm-property {color: black;}
.cm-s-default .cm-operator {color: black;}
.cm-s-default .cm-comment {color: #a50;}
.cm-s-default .cm-string {color: #a11;}
.cm-s-default .cm-string-2 {color: #f50;}
@ -94,12 +125,16 @@ div.CodeMirror-overwrite div.CodeMirror-cursor {}
.cm-header, .cm-strong {font-weight: bold;}
.cm-em {font-style: italic;}
.cm-link {text-decoration: underline;}
.cm-strikethrough {text-decoration: line-through;}
.cm-s-default .cm-error {color: #f00;}
.cm-invalidchar {color: #f00;}
/* Default styles for common addons */
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
.CodeMirror-activeline-background {background: #e8f2ff;}
/* STOP */
@ -108,152 +143,159 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
the editor. You probably shouldn't touch them. */
.CodeMirror {
line-height: 1;
position: relative;
overflow: hidden;
background: white;
color: black;
line-height: 1;
position: relative;
overflow: hidden;
background: white;
color: black;
}
.CodeMirror-scroll {
/* 30px is the magic margin used to hide the element's real scrollbars */
/* See overflow: hidden in .CodeMirror */
margin-bottom: -30px; margin-right: -30px;
padding-bottom: 30px;
height: 100%;
outline: none; /* Prevent dragging from highlighting the element */
position: relative;
-moz-box-sizing: content-box;
box-sizing: content-box;
/* 30px is the magic margin used to hide the element's real scrollbars */
/* See overflow: hidden in .CodeMirror */
margin-bottom: -30px; margin-right: -30px;
padding-bottom: 30px;
height: 100%;
outline: none; /* Prevent dragging from highlighting the element */
position: relative;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.CodeMirror-sizer {
position: relative;
border-right: 30px solid transparent;
-moz-box-sizing: content-box;
box-sizing: content-box;
position: relative;
border-right: 30px solid transparent;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
/* The fake, visible scrollbars. Used to force redraw during scrolling
before actuall scrolling happens, thus preventing shaking and
flickering artifacts. */
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
position: absolute;
z-index: 6;
display: none;
position: absolute;
z-index: 6;
display: none;
}
.CodeMirror-vscrollbar {
right: 0; top: 0;
overflow-x: hidden;
overflow-y: scroll;
right: 0; top: 0;
overflow-x: hidden;
overflow-y: scroll;
}
.CodeMirror-hscrollbar {
bottom: 0; left: 0;
overflow-y: hidden;
overflow-x: scroll;
bottom: 0; left: 0;
overflow-y: hidden;
overflow-x: scroll;
}
.CodeMirror-scrollbar-filler {
right: 0; bottom: 0;
right: 0; bottom: 0;
}
.CodeMirror-gutter-filler {
left: 0; bottom: 0;
left: 0; bottom: 0;
}
.CodeMirror-gutters {
position: absolute; left: 0; top: 0;
padding-bottom: 30px;
z-index: 3;
position: absolute; left: 0; top: 0;
padding-bottom: 30px;
z-index: 3;
}
.CodeMirror-gutter {
white-space: normal;
height: 100%;
-moz-box-sizing: content-box;
box-sizing: content-box;
padding-bottom: 30px;
margin-bottom: -32px;
display: inline-block;
/* Hack to make IE7 behave */
*zoom:1;
*display:inline;
white-space: normal;
height: 100%;
-moz-box-sizing: content-box;
box-sizing: content-box;
padding-bottom: 30px;
margin-bottom: -32px;
display: inline-block;
/* Hack to make IE7 behave */
*zoom:1;
*display:inline;
}
.CodeMirror-gutter-wrapper {
position: absolute;
z-index: 4;
height: 100%;
}
.CodeMirror-gutter-elt {
position: absolute;
cursor: default;
z-index: 4;
position: absolute;
cursor: default;
z-index: 4;
}
.CodeMirror-lines {
cursor: text;
cursor: text;
min-height: 1px; /* prevents collapsing before first draw */
}
.CodeMirror pre {
/* Reset some styles that the rest of the page might have set */
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
border-width: 0;
background: transparent;
font-family: inherit;
font-size: inherit;
margin: 0;
white-space: pre;
word-wrap: normal;
line-height: inherit;
color: inherit;
z-index: 2;
position: relative;
overflow: visible;
/* Reset some styles that the rest of the page might have set */
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
border-width: 0;
background: transparent;
font-family: inherit;
font-size: inherit;
margin: 0;
white-space: pre;
word-wrap: normal;
line-height: inherit;
color: inherit;
z-index: 2;
position: relative;
overflow: visible;
}
.CodeMirror-wrap pre {
word-wrap: break-word;
white-space: pre-wrap;
word-break: normal;
word-wrap: break-word;
white-space: pre-wrap;
word-break: normal;
}
.CodeMirror-linebackground {
position: absolute;
left: 0; right: 0; top: 0; bottom: 0;
z-index: 0;
position: absolute;
left: 0; right: 0; top: 0; bottom: 0;
z-index: 0;
}
.CodeMirror-linewidget {
position: relative;
z-index: 2;
overflow: auto;
position: relative;
z-index: 2;
overflow: auto;
}
.CodeMirror-widget {}
.CodeMirror-wrap .CodeMirror-scroll {
overflow-x: hidden;
overflow-x: hidden;
}
.CodeMirror-measure {
position: absolute;
width: 100%;
height: 0;
overflow: hidden;
visibility: hidden;
position: absolute;
width: 100%;
height: 0;
overflow: hidden;
visibility: hidden;
}
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor {
position: absolute;
border-right: none;
width: 0;
position: absolute;
border-right: none;
width: 0;
}
div.CodeMirror-cursors {
visibility: hidden;
position: relative;
z-index: 1;
visibility: hidden;
position: relative;
z-index: 3;
}
.CodeMirror-focused div.CodeMirror-cursors {
visibility: visible;
visibility: visible;
}
.CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
.CodeMirror-crosshair { cursor: crosshair; }
.cm-searching {
background: #ffa;
background: rgba(255, 255, 0, .4);
background: #ffa;
background: rgba(255, 255, 0, .4);
}
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
@ -263,8 +305,14 @@ div.CodeMirror-cursors {
.cm-force-border { padding-right: .1px; }
@media print {
/* Hide the cursor when printing */
.CodeMirror div.CodeMirror-cursors {
visibility: hidden;
}
/* Hide the cursor when printing */
.CodeMirror div.CodeMirror-cursors {
visibility: hidden;
}
}
/* See issue #2901 */
.cm-tab-wrap-hack:after { content: ''; }
/* Help users use markselection to safely style text background */
span.CodeMirror-selectedtext { background: none; }

View File

@ -1,4 +1,4 @@
Copyright (c) 2013, Michael Bostock
Copyright (c) 2010-2014, Michael Bostock
All rights reserved.
Redistribution and use in source and binary forms, with or without

File diff suppressed because one or more lines are too long

View File

@ -93,7 +93,7 @@
// ensure we found the selected option
if (isDefinedAndNotNull(selectedOption)) {
$(comboText).removeClass('selected-disabled-option').attr('title', selectedOption.text).text(selectedOption.text).data('text', selectedOption.text);
$(comboText).removeClass('selected-disabled-option').attr('title', selectedOption.text).text(selectedOption.text).data('text', selectedOption.text).width(combo.outerWidth() - 25);
// if the selected option is disabled show it
if (selectedOption.disabled === true) {
@ -245,9 +245,6 @@
// add the drop down arrow
$('<div class="combo-arrow"></div>').appendTo(combo);
// set the width of the combo text
comboText.width($(combo).outerWidth() - 25);
// set the selection
if (isDefinedAndNotNull(options.selectedOption)) {
selectOption(combo, options.selectedOption.text, options.selectedOption.value);

View File

@ -1,625 +0,0 @@
/*
* jQuery UI CSS Framework 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*/
/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-clearfix { display: inline-block; }
/* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix { height:1%; }
.ui-helper-clearfix { display:block; }
/* end clearfix */
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
/* Interaction Cues
----------------------------------*/
.ui-state-disabled { cursor: default !important; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
/*
* jQuery UI CSS Framework 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
*/
/* Component containers
----------------------------------*/
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
.ui-widget .ui-widget { font-size: 1em; }
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
.ui-widget-content a { color: #222222; }
.ui-widget-header a { color: #222222; }
.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
/* Interaction states
----------------------------------*/
/*.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }*/
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
font-weight: normal;
color: #555555;
}
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
/*.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }*/
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {
font-weight: normal;
color: #212121;
outline: none;
}
/* override the highlight when hovering over certain elements */
li.ui-menu-item .ui-state-hover {
background: #D4E0E5 !important;
border: 1px solid #999999;
}
.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
.ui-widget :active { outline: none; }
/* Interaction Cues
----------------------------------*/
/*.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }*/
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {
background: #FFE8B3;
color: #363636;
}
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
/*.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }*/
.ui-state-default .ui-icon {
background-image: url(images/ui-icons_ffffff_256x240.png);
}
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
/* positioning */
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-off { background-position: -96px -144px; }
.ui-icon-radio-on { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
/*
.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
*/
/* Overlays */
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
* jQuery UI Resizable 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Resizable#theming
*/
.ui-resizable { position: relative;}
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
* jQuery UI Selectable 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Selectable#theming
*/
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
/*
* jQuery UI Accordion 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Accordion#theming
*/
/* IE/Win - Fix animation bug - #4615 */
.ui-accordion { width: 100%; }
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
.ui-accordion .ui-accordion-li-fix { display: inline; }
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
.ui-accordion .ui-accordion-content-active { display: block; }
/*
* jQuery UI Autocomplete 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Autocomplete#theming
*/
/*.ui-autocomplete { position: absolute; cursor: default; } */
.ui-autocomplete {
position: absolute;
cursor: default;
border: 1px solid #aaaaaa;
}
/* workarounds */
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
/*
* jQuery UI Menu 1.8.10
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Menu#theming
*/
.ui-menu {
list-style:none;
padding: 2px;
margin: 0;
display:block;
float: left;
}
.ui-menu .ui-menu {
margin-top: -3px;
}
.ui-menu .ui-menu-item {
margin:0;
padding: 0;
zoom: 1;
float: left;
clear: left;
width: 100%;
}
.ui-menu .ui-menu-item a {
text-decoration:none;
display:block;
padding:.2em .4em;
line-height:1.5;
zoom:1;
}
.ui-menu .ui-menu-item a.ui-state-hover,
.ui-menu .ui-menu-item a.ui-state-active {
font-weight: normal;
margin: -1px;
}
/*
* jQuery UI Button 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Button#theming
*/
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
.ui-button-icons-only { width: 3.4em; }
button.ui-button-icons-only { width: 3.7em; }
/*button text element */
.ui-button .ui-button-text { display: block; line-height: 1.4; }
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
/* no icon support for input elements, provide padding by default */
input.ui-button { padding: .4em 1em; }
/*button icon element(s) */
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
/*button sets*/
.ui-buttonset { margin-right: 7px; }
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
/* workarounds */
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
/*
* jQuery UI Dialog 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Dialog#theming
*/
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
.ui-draggable .ui-dialog-titlebar { cursor: move; }
/*
* jQuery UI Slider 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Slider#theming
*/
.ui-slider { position: relative; text-align: left; }
/*.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }*/
.ui-slider .ui-slider-handle {
border: 1px solid #999999;
position: absolute;
z-index: 2;
width: 1.2em;
height: 1.2em;
cursor: default;
}
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
.ui-slider-horizontal { height: .8em; }
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
.ui-slider-vertical { width: .8em; height: 100px; }
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
* jQuery UI Tabs 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Tabs#theming
*/
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
.ui-tabs .ui-tabs-hide { display: none !important; }
/*
* jQuery UI Datepicker 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Datepicker#theming
*/
/*.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }*/
.ui-datepicker {
width: 17em;
padding: .2em .2em 0;
border: 1px solid #aaa;
display: none;
}
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
/*.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }*/
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover {
top: 1px;
border: 1px solid #aaa;
cursor: pointer;
}
.ui-datepicker .ui-datepicker-prev { left:2px; }
.ui-datepicker .ui-datepicker-next { right:2px; }
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year { width: 49%;}
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
.ui-datepicker td { border: 0; padding: 1px; }
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi { width:auto; }
.ui-datepicker-multi .ui-datepicker-group { float:left; }
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
.ui-datepicker-row-break { clear:both; width:100%; }
/* RTL support */
.ui-datepicker-rtl { direction: rtl; }
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
display: none; /*sorry for IE5*/
display/**/: block; /*sorry for IE5*/
position: absolute; /*must have*/
z-index: -1; /*must have*/
filter: mask(); /*must have*/
top: -4px; /*must have*/
left: -4px; /*must have*/
width: 200px; /*must have*/
height: 200px; /*must have*/
}/*
* jQuery UI Progressbar 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Progressbar#theming
*/
.ui-progressbar { height:2em; text-align: left; }
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }

File diff suppressed because one or more lines are too long

View File

@ -1,194 +0,0 @@
/*!
* jquery.event.drag - v 2.0.0
* Copyright (c) 2010 Three Dub Media - http://threedubmedia.com
* Open Source MIT License - http://threedubmedia.com/code/license
*/
;
(function (f) {
f.fn.drag = function (b, a, d) {
var e = typeof b == "string" ? b : "", k = f.isFunction(b) ? b : f.isFunction(a) ? a : null;
if (e.indexOf("drag") !== 0)
e = "drag" + e;
d = (b == k ? a : d) || {};
return k ? this.bind(e, d, k) : this.trigger(e)
};
var i = f.event, h = i.special, c = h.drag = {defaults: {which: 1, distance: 0, not: ":input", handle: null, relative: false, drop: true, click: false}, datakey: "dragdata", livekey: "livedrag", add: function (b) {
var a = f.data(this, c.datakey), d = b.data || {};
a.related += 1;
if (!a.live && b.selector) {
a.live = true;
i.add(this, "draginit." + c.livekey, c.delegate)
}
f.each(c.defaults, function (e) {
if (d[e] !== undefined)
a[e] = d[e]
})
}, remove: function () {
f.data(this, c.datakey).related -= 1
}, setup: function () {
if (!f.data(this, c.datakey)) {
var b = f.extend({related: 0}, c.defaults);
f.data(this, c.datakey, b);
i.add(this, "mousedown", c.init, b);
this.attachEvent && this.attachEvent("ondragstart", c.dontstart)
}
}, teardown: function () {
if (!f.data(this, c.datakey).related) {
f.removeData(this, c.datakey);
i.remove(this, "mousedown", c.init);
i.remove(this, "draginit", c.delegate);
c.textselect(true);
this.detachEvent && this.detachEvent("ondragstart", c.dontstart)
}
}, init: function (b) {
var a = b.data, d;
if (!(a.which > 0 && b.which != a.which))
if (!f(b.target).is(a.not))
if (!(a.handle && !f(b.target).closest(a.handle, b.currentTarget).length)) {
a.propagates = 1;
a.interactions = [c.interaction(this, a)];
a.target = b.target;
a.pageX = b.pageX;
a.pageY = b.pageY;
a.dragging = null;
d = c.hijack(b, "draginit", a);
if (a.propagates) {
if ((d = c.flatten(d)) && d.length) {
a.interactions = [];
f.each(d, function () {
a.interactions.push(c.interaction(this, a))
})
}
a.propagates = a.interactions.length;
a.drop !== false && h.drop && h.drop.handler(b, a);
c.textselect(false);
i.add(document, "mousemove mouseup", c.handler, a);
return false
}
}
}, interaction: function (b, a) {
return{drag: b, callback: new c.callback, droppable: [], offset: f(b)[a.relative ? "position" : "offset"]() || {top: 0, left: 0}}
}, handler: function (b) {
var a = b.data;
switch (b.type) {
case !a.dragging && "mousemove":
if (Math.pow(b.pageX - a.pageX, 2) + Math.pow(b.pageY - a.pageY, 2) < Math.pow(a.distance, 2))
break;
b.target = a.target;
c.hijack(b, "dragstart", a);
if (a.propagates)
a.dragging = true;
case "mousemove":
if (a.dragging) {
c.hijack(b, "drag", a);
if (a.propagates) {
a.drop !== false && h.drop && h.drop.handler(b, a);
break
}
b.type = "mouseup"
}
case "mouseup":
i.remove(document, "mousemove mouseup", c.handler);
if (a.dragging) {
a.drop !== false && h.drop && h.drop.handler(b, a);
c.hijack(b, "dragend", a)
}
c.textselect(true);
if (a.click === false && a.dragging) {
jQuery.event.triggered = true;
setTimeout(function () {
jQuery.event.triggered = false
}, 20);
a.dragging = false
}
break
}
}, delegate: function (b) {
var a = [], d, e = f.data(this, "events") || {};
f.each(e.live || [], function (k, j) {
if (j.preType.indexOf("drag") === 0)
if (d = f(b.target).closest(j.selector, b.currentTarget)[0]) {
i.add(d, j.origType + "." + c.livekey, j.origHandler, j.data);
f.inArray(d, a) < 0 && a.push(d)
}
});
if (!a.length)
return false;
return f(a).bind("dragend." + c.livekey, function () {
i.remove(this, "." + c.livekey)
})
}, hijack: function (b, a, d, e, k) {
if (d) {
var j = {event: b.originalEvent, type: b.type}, n = a.indexOf("drop") ? "drag" : "drop", l, o = e || 0, g, m;
e = !isNaN(e) ? e : d.interactions.length;
b.type = a;
b.originalEvent = null;
d.results = [];
do
if (g = d.interactions[o])
if (!(a !== "dragend" && g.cancelled)) {
m = c.properties(b, d, g);
g.results = [];
f(k || g[n] || d.droppable).each(function (q, p) {
l = (m.target = p) ? i.handle.call(p, b, m) : null;
if (l === false) {
if (n == "drag") {
g.cancelled = true;
d.propagates -= 1
}
if (a == "drop")
g[n][q] = null
} else if (a == "dropinit")
g.droppable.push(c.element(l) || p);
if (a == "dragstart")
g.proxy = f(c.element(l) || g.drag)[0];
g.results.push(l);
delete b.result;
if (a !== "dropinit")
return l
});
d.results[o] = c.flatten(g.results);
if (a == "dropinit")
g.droppable = c.flatten(g.droppable);
a == "dragstart" && !g.cancelled && m.update()
}
while (++o < e);
b.type = j.type;
b.originalEvent = j.event;
return c.flatten(d.results)
}
}, properties: function (b, a, d) {
var e = d.callback;
e.drag = d.drag;
e.proxy = d.proxy || d.drag;
e.startX = a.pageX;
e.startY = a.pageY;
e.deltaX = b.pageX - a.pageX;
e.deltaY = b.pageY - a.pageY;
e.originalX = d.offset.left;
e.originalY = d.offset.top;
e.offsetX = b.pageX - (a.pageX - e.originalX);
e.offsetY = b.pageY - (a.pageY - e.originalY);
e.drop = c.flatten((d.drop || []).slice());
e.available = c.flatten((d.droppable || []).slice());
return e
}, element: function (b) {
if (b && (b.jquery || b.nodeType == 1))
return b
}, flatten: function (b) {
return f.map(b, function (a) {
return a && a.jquery ? f.makeArray(a) : a && a.length ? c.flatten(a) : a
})
}, textselect: function (b) {
f(document)[b ? "unbind" : "bind"]("selectstart", c.dontstart).attr("unselectable", b ? "off" : "on").css("MozUserSelect", b ? "" : "none")
}, dontstart: function () {
return false
}, callback: function () {
}};
c.callback.prototype = {update: function () {
h.drop && this.available.length && f.each(this.available, function (b) {
h.drop.locate(this, b)
})
}};
h.draginit = h.dragstart = h.dragend = c
})(jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,245 +1,259 @@
.minicolors {
position: relative;
position: relative;
}
.minicolors-swatch {
position: absolute;
vertical-align: middle;
background: url(jquery.minicolors.png) -80px 0;
border: solid 1px #ccc;
cursor: text;
padding: 0;
margin: 0;
display: inline-block;
position: absolute;
vertical-align: middle;
background: url(jquery.minicolors.png) -80px 0;
border: solid 1px #ccc;
cursor: text;
padding: 0;
margin: 0;
display: inline-block;
}
.minicolors-swatch-color {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.minicolors input[type=hidden] + .minicolors-swatch {
width: 28px;
position: static;
cursor: pointer;
width: 28px;
position: static;
cursor: pointer;
}
/* Panel */
.minicolors-panel {
position: absolute;
width: 173px;
height: 152px;
background: white;
border: solid 1px #CCC;
box-shadow: 0 0 20px rgba(0, 0, 0, .2);
z-index: 99999;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
display: none;
position: absolute;
width: 173px;
height: 152px;
background: white;
border: solid 1px #CCC;
box-shadow: 0 0 20px rgba(0, 0, 0, .2);
z-index: 99999;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
display: none;
}
.minicolors-panel.minicolors-visible {
display: block;
display: block;
}
/* Panel positioning */
.minicolors-position-top .minicolors-panel {
top: -154px;
top: -154px;
}
.minicolors-position-right .minicolors-panel {
right: 0;
right: 0;
}
.minicolors-position-bottom .minicolors-panel {
top: auto;
top: auto;
}
.minicolors-position-left .minicolors-panel {
left: 0;
left: 0;
}
.minicolors-with-opacity .minicolors-panel {
width: 194px;
width: 194px;
}
.minicolors .minicolors-grid {
position: absolute;
top: 1px;
left: 1px;
width: 150px;
height: 150px;
background: url(jquery.minicolors.png) -120px 0;
cursor: crosshair;
position: absolute;
top: 1px;
left: 1px;
width: 150px;
height: 150px;
background: url(jquery.minicolors.png) -120px 0;
cursor: crosshair;
}
.minicolors .minicolors-grid-inner {
position: absolute;
top: 0;
left: 0;
width: 150px;
height: 150px;
background: none;
position: absolute;
top: 0;
left: 0;
width: 150px;
height: 150px;
background: none;
}
.minicolors-slider-saturation .minicolors-grid {
background-position: -420px 0;
background-position: -420px 0;
}
.minicolors-slider-saturation .minicolors-grid-inner {
background: url(jquery.minicolors.png) -270px 0;
background: url(jquery.minicolors.png) -270px 0;
}
.minicolors-slider-brightness .minicolors-grid {
background-position: -570px 0;
background-position: -570px 0;
}
.minicolors-slider-brightness .minicolors-grid-inner {
background: black;
background: black;
}
.minicolors-slider-wheel .minicolors-grid {
background-position: -720px 0;
background-position: -720px 0;
}
.minicolors-slider,
.minicolors-opacity-slider {
position: absolute;
top: 1px;
left: 152px;
width: 20px;
height: 150px;
background: white url(jquery.minicolors.png) 0 0;
cursor: row-resize;
position: absolute;
top: 1px;
left: 152px;
width: 20px;
height: 150px;
background: white url(jquery.minicolors.png) 0 0;
cursor: row-resize;
}
.minicolors-slider-saturation .minicolors-slider {
background-position: -60px 0;
background-position: -60px 0;
}
.minicolors-slider-brightness .minicolors-slider {
background-position: -20px 0;
background-position: -20px 0;
}
.minicolors-slider-wheel .minicolors-slider {
background-position: -20px 0;
background-position: -20px 0;
}
.minicolors-opacity-slider {
left: 173px;
background-position: -40px 0;
display: none;
left: 173px;
background-position: -40px 0;
display: none;
}
.minicolors-with-opacity .minicolors-opacity-slider {
display: block;
display: block;
}
/* Pickers */
.minicolors-grid .minicolors-picker {
position: absolute;
top: 70px;
left: 70px;
width: 12px;
height: 12px;
border: solid 1px black;
border-radius: 10px;
margin-top: -6px;
margin-left: -6px;
background: none;
position: absolute;
top: 70px;
left: 70px;
width: 12px;
height: 12px;
border: solid 1px black;
border-radius: 10px;
margin-top: -6px;
margin-left: -6px;
background: none;
}
.minicolors-grid .minicolors-picker > div {
position: absolute;
top: 0;
left: 0;
width: 8px;
height: 8px;
border-radius: 8px;
border: solid 2px white;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
position: absolute;
top: 0;
left: 0;
width: 8px;
height: 8px;
border-radius: 8px;
border: solid 2px white;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
.minicolors-picker {
position: absolute;
top: 0;
left: 0;
width: 18px;
height: 2px;
background: white;
border: solid 1px black;
margin-top: -2px;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
position: absolute;
top: 0;
left: 0;
width: 18px;
height: 2px;
background: white;
border: solid 1px black;
margin-top: -2px;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
/* Inline controls */
.minicolors-inline {
display: inline-block;
display: inline-block;
}
.minicolors-inline .minicolors-input {
display: none !important;
display: none !important;
}
.minicolors-inline .minicolors-panel {
position: relative;
top: auto;
left: auto;
box-shadow: none;
z-index: auto;
display: inline-block;
position: relative;
top: auto;
left: auto;
box-shadow: none;
z-index: auto;
display: inline-block;
}
/* Default theme */
.minicolors-theme-default .minicolors-swatch {
top: 5px;
left: 5px;
width: 18px;
height: 18px;
top: 5px;
left: 5px;
width: 18px;
height: 18px;
}
.minicolors-theme-default.minicolors-position-right .minicolors-swatch {
left: auto;
right: 5px;
left: auto;
right: 5px;
}
.minicolors-theme-default.minicolors {
width: auto;
display: inline-block;
width: auto;
display: inline-block;
}
.minicolors-theme-default .minicolors-input {
height: 20px;
width: auto;
display: inline-block;
padding-left: 26px;
height: 20px;
width: auto;
display: inline-block;
padding-left: 26px;
}
.minicolors-theme-default.minicolors-position-right .minicolors-input {
padding-right: 26px;
padding-left: inherit;
padding-right: 26px;
padding-left: inherit;
}
/* Bootstrap theme */
.minicolors-theme-bootstrap .minicolors-swatch {
top: 3px;
left: 3px;
width: 28px;
height: 28px;
border-radius: 3px;
top: 3px;
left: 3px;
width: 28px;
height: 28px;
border-radius: 3px;
}
.minicolors-theme-bootstrap .minicolors-swatch-color {
border-radius: inherit;
}
.minicolors-theme-bootstrap.minicolors-position-right .minicolors-swatch {
left: auto;
right: 3px;
left: auto;
right: 3px;
}
.minicolors-theme-bootstrap .minicolors-input {
padding-left: 44px;
padding-left: 44px;
}
.minicolors-theme-bootstrap.minicolors-position-right .minicolors-input {
padding-right: 44px;
padding-left: 12px;
padding-right: 44px;
padding-left: 12px;
}
.minicolors-theme-bootstrap .minicolors-input.input-lg + .minicolors-swatch {
top: 4px;
left: 4px;
width: 37px;
height: 37px;
border-radius: 5px;
}
.minicolors-theme-bootstrap .minicolors-input.input-sm + .minicolors-swatch {
width: 24px;
height: 24px;
}

View File

@ -1,557 +0,0 @@
/*
* qTip2 - Pretty powerful tooltips
* http://craigsworks.com/projects/qtip2/
*
* Version: 2.0.0pre
* Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com
*
* Dual licensed under MIT or GPLv2 licenses
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Thu Apr 26 20:40:09 2012 +0100
*/
/* Core qTip styles */
.ui-tooltip, .qtip{
position: absolute;
left: -28000px;
top: -28000px;
display: none;
max-width: 600px;
min-width: 50px;
font-size: 10.5px;
line-height: 12px;
}
/* Fluid class for determining actual width in IE */
.ui-tooltip-fluid{
display: block;
visibility: hidden;
position: static !important;
float: left !important;
}
.ui-tooltip-content{
position: relative;
padding: 5px 9px;
overflow: hidden;
border: 1px solid #000001;
text-align: left;
word-wrap: break-word;
overflow: hidden;
}
.ui-tooltip-titlebar{
position: relative;
min-height: 14px;
padding: 5px 35px 5px 10px;
overflow: hidden;
border: 1px solid #000001;
border-width: 1px 1px 0;
font-weight: bold;
}
.ui-tooltip-titlebar + .ui-tooltip-content{ border-top-width: 0px !important; }
/*! Default close button class */
.ui-tooltip-titlebar .ui-state-default{
position: absolute;
right: 4px;
top: 50%;
margin-top: -9px;
cursor: pointer;
outline: medium none;
border-width: 1px;
border-style: solid;
}
* html .ui-tooltip-titlebar .ui-state-default{ top: 16px; } /* IE fix */
.ui-tooltip-titlebar .ui-icon,
.ui-tooltip-icon .ui-icon{
display: block;
text-indent: -1000em;
}
.ui-tooltip-icon, .ui-tooltip-icon .ui-icon{
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.ui-tooltip-icon .ui-icon{
width: 18px;
height: 14px;
text-align: center;
text-indent: 0;
font: normal bold 10px/13px Tahoma,sans-serif;
color: inherit;
background: transparent none no-repeat -100em -100em;
}
/* Applied to 'focused' tooltips e.g. most recently displayed/interacted with */
.ui-tooltip-focus{
}
/* Applied on hover of tooltips i.e. added/removed on mouseenter/mouseleave respectively */
.ui-tooltip-hover{
}
/*! Default tooltip style */
.ui-tooltip-default .ui-tooltip-titlebar,
.ui-tooltip-default .ui-tooltip-content{
border-color: #F1D031;
background-color: #FFFFA3;
color: #555;
}
.ui-tooltip-default .ui-tooltip-titlebar{
background-color: #FFEF93;
}
.ui-tooltip-default .ui-tooltip-icon{
border-color: #CCC;
background: #F1F1F1;
color: #777;
}
.ui-tooltip-default .ui-tooltip-titlebar .ui-state-hover{
border-color: #AAA;
color: #111;
}
/* Modal plugin */
#qtip-overlay{
position: fixed;
left: -10000em;
top: -10000em;
}
/* Applied to modals with show.modal.blur set to true */
#qtip-overlay.blurs{ cursor: pointer; }
/* Change opacity of overlay here */
#qtip-overlay div{
position: absolute;
left: 0; top: 0;
width: 100%; height: 100%;
background-color: black;
opacity: 0.7;
filter:alpha(opacity=70);
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
}
/* Tips plugin */
.ui-tooltip .ui-tooltip-tip{
margin: 0 auto;
overflow: hidden;
z-index: 10;
}
.ui-tooltip .ui-tooltip-tip,
.ui-tooltip .ui-tooltip-tip *{
position: absolute;
line-height: 0.1px !important;
font-size: 0.1px !important;
color: #123456;
background: transparent;
border: 0px dashed transparent;
}
.ui-tooltip .ui-tooltip-tip canvas{ top: 0; left: 0; }
/*! Light tooltip style */
.ui-tooltip-light .ui-tooltip-titlebar,
.ui-tooltip-light .ui-tooltip-content{
border-color: #E2E2E2;
color: #454545;
}
.ui-tooltip-light .ui-tooltip-content{
background-color: white;
}
.ui-tooltip-light .ui-tooltip-titlebar{
background-color: #f1f1f1;
}
/*! Dark tooltip style */
.ui-tooltip-dark .ui-tooltip-titlebar,
.ui-tooltip-dark .ui-tooltip-content{
border-color: #303030;
color: #f3f3f3;
}
.ui-tooltip-dark .ui-tooltip-content{
background-color: #505050;
}
.ui-tooltip-dark .ui-tooltip-titlebar{
background-color: #404040;
}
.ui-tooltip-dark .ui-tooltip-icon{
border-color: #444;
}
.ui-tooltip-dark .ui-tooltip-titlebar .ui-state-hover{
border-color: #303030;
}
/*! Cream tooltip style */
.ui-tooltip-cream .ui-tooltip-titlebar,
.ui-tooltip-cream .ui-tooltip-content{
border-color: #F9E98E;
color: #A27D35;
}
.ui-tooltip-cream .ui-tooltip-content{
background-color: #FBF7AA;
}
.ui-tooltip-cream .ui-tooltip-titlebar{
background-color: #F0DE7D;
}
.ui-tooltip-cream .ui-state-default .ui-tooltip-icon{
background-position: -82px 0;
}
/*! Red tooltip style */
.ui-tooltip-red .ui-tooltip-titlebar,
.ui-tooltip-red .ui-tooltip-content{
border-color: #D95252;
color: #912323;
}
.ui-tooltip-red .ui-tooltip-content{
background-color: #F78B83;
}
.ui-tooltip-red .ui-tooltip-titlebar{
background-color: #F06D65;
}
.ui-tooltip-red .ui-state-default .ui-tooltip-icon{
background-position: -102px 0;
}
.ui-tooltip-red .ui-tooltip-icon{
border-color: #D95252;
}
.ui-tooltip-red .ui-tooltip-titlebar .ui-state-hover{
border-color: #D95252;
}
/*! Green tooltip style */
.ui-tooltip-green .ui-tooltip-titlebar,
.ui-tooltip-green .ui-tooltip-content{
border-color: #90D93F;
color: #3F6219;
}
.ui-tooltip-green .ui-tooltip-content{
background-color: #CAED9E;
}
.ui-tooltip-green .ui-tooltip-titlebar{
background-color: #B0DE78;
}
.ui-tooltip-green .ui-state-default .ui-tooltip-icon{
background-position: -42px 0;
}
/*! Blue tooltip style */
.ui-tooltip-blue .ui-tooltip-titlebar,
.ui-tooltip-blue .ui-tooltip-content{
border-color: #ADD9ED;
color: #5E99BD;
}
.ui-tooltip-blue .ui-tooltip-content{
background-color: #E5F6FE;
}
.ui-tooltip-blue .ui-tooltip-titlebar{
background-color: #D0E9F5;
}
.ui-tooltip-blue .ui-state-default .ui-tooltip-icon{
background-position: -2px 0;
}
/*! Add shadows to your tooltips in: FF3+, Chrome 2+, Opera 10.6+, IE6+, Safari 2+ */
.ui-tooltip-shadow{
-webkit-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
}
.ui-tooltip-shadow .ui-tooltip-titlebar,
.ui-tooltip-shadow .ui-tooltip-content{
filter: progid:DXImageTransform.Microsoft.Shadow(Color='gray', Direction=135, Strength=3);
-ms-filter:"progid:DXImageTransform.Microsoft.Shadow(Color='gray', Direction=135, Strength=3)";
_margin-bottom: -3px; /* IE6 */
.margin-bottom: -3px; /* IE7 */
}
/*! Add rounded corners to your tooltips in: FF3+, Chrome 2+, Opera 10.6+, IE9+, Safari 2+ */
.ui-tooltip-rounded,
.ui-tooltip-rounded .ui-tooltip-content,
.ui-tooltip-tipsy,
.ui-tooltip-tipsy .ui-tooltip-content,
.ui-tooltip-youtube,
.ui-tooltip-youtube .ui-tooltip-content{
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
}
.ui-tooltip-rounded .ui-tooltip-titlebar,
.ui-tooltip-tipsy .ui-tooltip-titlebar,
.ui-tooltip-youtube .ui-tooltip-titlebar{
-moz-border-radius: 5px 5px 0 0;
-webkit-border-radius: 5px 5px 0 0;
border-radius: 5px 5px 0 0;
}
.ui-tooltip-rounded .ui-tooltip-titlebar + .ui-tooltip-content,
.ui-tooltip-tipsy .ui-tooltip-titlebar + .ui-tooltip-content,
.ui-tooltip-youtube .ui-tooltip-titlebar + .ui-tooltip-content{
-moz-border-radius: 0 0 5px 5px;
-webkit-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
/*! Youtube tooltip style */
.ui-tooltip-youtube{
-webkit-box-shadow: 0 0 3px #333;
-moz-box-shadow: 0 0 3px #333;
box-shadow: 0 0 3px #333;
}
.ui-tooltip-youtube .ui-tooltip-titlebar,
.ui-tooltip-youtube .ui-tooltip-content{
_margin-bottom: 0; /* IE6 */
.margin-bottom: 0; /* IE7 */
background: transparent;
background: rgba(0, 0, 0, 0.85);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#D9000000,endColorstr=#D9000000);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#D9000000,endColorstr=#D9000000)";
color: white;
border-color: #CCCCCC;
}
.ui-tooltip-youtube .ui-tooltip-icon{
border-color: #222;
}
.ui-tooltip-youtube .ui-tooltip-titlebar .ui-state-hover{
border-color: #303030;
}
/* jQuery TOOLS Tooltip style */
.ui-tooltip-jtools{
background: #232323;
background: rgba(0, 0, 0, 0.7);
background-image: -moz-linear-gradient(top, #717171, #232323);
background-image: -webkit-gradient(linear, left top, left bottom, from(#717171), to(#232323));
border: 2px solid #ddd;
border: 2px solid rgba(241,241,241,1);
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-webkit-box-shadow: 0 0 12px #333;
-moz-box-shadow: 0 0 12px #333;
box-shadow: 0 0 12px #333;
}
/* IE Specific */
.ui-tooltip-jtools .ui-tooltip-titlebar{
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A)";
}
.ui-tooltip-jtools .ui-tooltip-content{
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323)";
}
.ui-tooltip-jtools .ui-tooltip-titlebar,
.ui-tooltip-jtools .ui-tooltip-content{
background: transparent;
color: white;
border: 0 dashed transparent;
}
.ui-tooltip-jtools .ui-tooltip-icon{
border-color: #555;
}
.ui-tooltip-jtools .ui-tooltip-titlebar .ui-state-hover{
border-color: #333;
}
/* Cluetip style */
.ui-tooltip-cluetip{
-webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
-moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
}
.ui-tooltip-cluetip .ui-tooltip-titlebar{
background-color: #87876A;
color: white;
border: 0 dashed transparent;
}
.ui-tooltip-cluetip .ui-tooltip-content{
background-color: #D9D9C2;
color: #111;
border: 0 dashed transparent;
}
.ui-tooltip-cluetip .ui-tooltip-icon{
border-color: #808064;
}
.ui-tooltip-cluetip .ui-tooltip-titlebar .ui-state-hover{
border-color: #696952;
color: #696952;
}
/* Tipsy style */
.ui-tooltip-tipsy{
border: 0;
}
.ui-tooltip-tipsy .ui-tooltip-titlebar,
.ui-tooltip-tipsy .ui-tooltip-content{
_margin-bottom: 0; /* IE6 */
.margin-bottom: 0; /* IE7 */
background: transparent;
background: rgba(0, 0, 0, .87);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#D9000000,endColorstr=#D9000000);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#D9000000,endColorstr=#D9000000)";
color: white;
border: 0px transparent;
font-size: 11px;
font-family: 'Lucida Grande', sans-serif;
font-weight: bold;
line-height: 16px;
text-shadow: 0 1px black;
}
.ui-tooltip-tipsy .ui-tooltip-titlebar{
padding: 6px 35px 0 10;
}
.ui-tooltip-tipsy .ui-tooltip-content{
padding: 6px 10;
}
.ui-tooltip-tipsy .ui-tooltip-icon{
border-color: #222;
text-shadow: none;
}
.ui-tooltip-tipsy .ui-tooltip-titlebar .ui-state-hover{
border-color: #303030;
}
/* Tipped style */
.ui-tooltip-tipped{
}
.ui-tooltip-tipped .ui-tooltip-titlebar,
.ui-tooltip-tipped .ui-tooltip-content{
border: 3px solid #959FA9;
filter: none; -ms-filter: none;
}
.ui-tooltip-tipped .ui-tooltip-titlebar{
background: #3A79B8;
background-image: -moz-linear-gradient(top, #3A79B8, #2E629D);
background-image: -webkit-gradient(linear, left top, left bottom, from(#3A79B8), to(#2E629D));
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D)";
color: white;
font-weight: normal;
font-family: serif;
border-bottom-width: 0;
-moz-border-radius: 3px 3px 0 0;
-webkit-border-radius: 3px 3px 0 0;
border-radius: 3px 3px 0 0;
}
.ui-tooltip-tipped .ui-tooltip-content{
background-color: #F9F9F9;
color: #454545;
-moz-border-radius: 0 0 3px 3px;
-webkit-border-radius: 0 0 3px 3px;
border-radius: 0 0 3px 3px;
}
.ui-tooltip-tipped .ui-tooltip-icon{
border: 2px solid #285589;
background: #285589;
}
.ui-tooltip-tipped .ui-tooltip-icon .ui-icon{
background-color: #FBFBFB;
color: #555;
}
/* IE9 fix - removes all filters */
.ui-tooltip:not(.ie9haxors) div.ui-tooltip-content,
.ui-tooltip:not(.ie9haxors) div.ui-tooltip-titlebar{
filter: none;
-ms-filter: none;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,20 @@
Copyright (c) 2010 Michael Leibman, http://github.com/mleibman/slickgrid
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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 846 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 851 B

View File

@ -31,24 +31,24 @@ classes should alter those!
}
.slick-headerrow {
background: #fafafa;
background: #fafafa;
}
.slick-headerrow-column {
background: #fafafa;
border-bottom: 0;
height: 100%;
background: #fafafa;
border-bottom: 0;
height: 100%;
}
.slick-row.ui-state-active {
background: #F5F7D7;
background: #F5F7D7;
}
.slick-row {
position: absolute;
background: white;
border: 0px;
line-height: 20px;
position: absolute;
background: white;
border: 0px;
line-height: 20px;
}
.slick-row:hover {
@ -56,37 +56,37 @@ classes should alter those!
}
.slick-row.selected {
z-index: 10;
z-index: 10;
background: #DFE8F6 !important;
}
.slick-cell {
padding-left: 4px;
padding-right: 4px;
padding-left: 4px;
padding-right: 4px;
border-style: solid !important;
}
.slick-group {
border-bottom: 2px solid silver;
border-bottom: 2px solid silver;
}
.slick-group-toggle {
width: 9px;
height: 9px;
margin-right: 5px;
width: 9px;
height: 9px;
margin-right: 5px;
}
.slick-group-toggle.expanded {
background: url(../../../../images/collapse.gif) no-repeat center center;
background: url(images/collapse.gif) no-repeat center center;
}
.slick-group-toggle.collapsed {
background: url(../../../../images/expand.gif) no-repeat center center;
background: url(images/expand.gif) no-repeat center center;
}
.slick-group-totals {
color: gray;
background: white;
color: gray;
background: white;
}
.slick-cell.selected {
@ -100,22 +100,36 @@ classes should alter those!
}
.slick-sortable-placeholder {
background: silver !important;
background: silver !important;
}
.slick-row[row$="1"], .slick-row[row$="3"], .slick-row[row$="5"], .slick-row[row$="7"], .slick-row[row$="9"] {
background: #fafafa;
.slick-row.odd {
background: #fafafa;
}
.slick-row.ui-state-active {
background: #F5F7D7;
background: #F5F7D7;
}
.slick-row.loading {
opacity: 0.5;
filter: alpha(opacity = 50);
opacity: 0.5;
filter: alpha(opacity = 50);
}
.slick-cell.invalid {
border-color: red;
border-color: red;
-moz-animation-duration: 0.2s;
-webkit-animation-duration: 0.2s;
-moz-animation-name: slickgrid-invalid-hilite;
-webkit-animation-name: slickgrid-invalid-hilite;
}
@-moz-keyframes slickgrid-invalid-hilite {
from { box-shadow: 0 0 6px red; }
to { box-shadow: none; }
}
@-webkit-keyframes slickgrid-invalid-hilite {
from { box-shadow: 0 0 6px red; }
to { box-shadow: none; }
}

View File

@ -6,153 +6,153 @@ classes should alter those!
*/
.slick-header.ui-state-default, .slick-headerrow.ui-state-default {
width: 100%;
overflow: hidden;
border-left: 0px;
width: 100%;
overflow: hidden;
/*border-left: 0px;*/
border: 0px;
}
.slick-header-columns, .slick-headerrow-columns {
width: 999999px;
position: relative;
white-space: nowrap;
cursor: default;
overflow: hidden;
position: relative;
white-space: nowrap;
cursor: default;
overflow: hidden;
}
.slick-header-column.ui-state-default {
position: relative;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
height: 16px;
line-height: 16px;
margin: 0;
padding: 4px;
border-right: 1px solid silver;
border-left: 0px;
border-top: 0px;
border-bottom: 0px;
float: left;
position: relative;
display: inline-block;
overflow: hidden;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
height: 16px;
line-height: 16px;
margin: 0;
padding: 4px;
border-right: 1px solid silver;
border-left: 0px;
border-top: 0px;
border-bottom: 0px;
float: left;
}
.slick-headerrow-column.ui-state-default {
padding: 4px;
padding: 4px;
}
.slick-header-column-sorted {
font-style: italic;
font-style: italic;
}
.slick-sort-indicator {
display: inline-block;
width: 8px;
height: 5px;
margin-left: 4px;
display: inline-block;
width: 8px;
height: 5px;
margin-left: 4px;
margin-top: 6px;
/*float: left;*/
}
.slick-sort-indicator-desc {
background: url(images/sort-desc.gif);
background: url(images/sort-desc.gif);
}
.slick-sort-indicator-asc {
background: url(images/sort-asc.gif);
background: url(images/sort-asc.gif);
}
.slick-resizable-handle {
position: absolute;
font-size: 0.1px;
display: block;
cursor: col-resize;
width: 4px;
right: 0px;
top: 0;
height: 100%;
position: absolute;
font-size: 0.1px;
display: block;
cursor: col-resize;
width: 4px;
right: 0px;
top: 0;
height: 100%;
}
.slick-sortable-placeholder {
background: silver;
background: silver;
}
.grid-canvas {
position: relative;
outline: 0;
position: relative;
outline: 0;
}
.slick-row.ui-widget-content, .slick-row.ui-state-active {
position: absolute;
border: 0px;
width: 100%;
position: absolute;
border: 0px;
width: 100%;
}
.slick-cell, .slick-headerrow-column {
position: absolute;
border: 1px solid transparent;
border-right: 1px dotted silver;
border-bottom-color: silver;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
vertical-align: middle;
z-index: 1;
padding: 1px 2px 2px 1px;
margin: 0;
white-space: nowrap;
cursor: default;
position: absolute;
border: 1px solid transparent;
border-right: 1px dotted silver;
border-bottom-color: silver;
overflow: hidden;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
vertical-align: middle;
z-index: 1;
padding: 1px 2px 2px 1px;
margin: 0;
white-space: nowrap;
cursor: default;
}
.slick-group {
}
.slick-group-toggle {
display: inline-block;
display: inline-block;
}
.slick-cell.highlighted {
background: lightskyblue;
background: rgba(0, 0, 255, 0.2);
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
transition: all 0.5s;
background: lightskyblue;
background: rgba(0, 0, 255, 0.2);
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
.slick-cell.flashing {
border: 1px solid red !important;
border: 1px solid red !important;
}
.slick-cell.editable {
z-index: 11;
overflow: visible;
background: white;
border-color: black;
border-style: solid;
z-index: 11;
overflow: visible;
background: white;
border-color: black;
border-style: solid;
}
.slick-cell:focus {
outline: none;
outline: none;
}
.slick-reorder-proxy {
display: inline-block;
background: blue;
opacity: 0.15;
filter: alpha(opacity = 15);
cursor: move;
display: inline-block;
background: blue;
opacity: 0.15;
filter: alpha(opacity = 15);
cursor: move;
}
.slick-reorder-guide {
display: inline-block;
height: 2px;
background: blue;
opacity: 0.7;
filter: alpha(opacity = 70);
display: inline-block;
height: 2px;
background: blue;
opacity: 0.7;
filter: alpha(opacity = 70);
}
.slick-selection {
z-index: 10;
position: absolute;
border: 2px dashed black;
z-index: 10;
position: absolute;
border: 2px dashed black;
}

View File

@ -1,48 +1,83 @@
(function ($) {
// register namespace
$.extend(true, window, {
"Slick": {
"AutoTooltips": AutoTooltips
}
});
function AutoTooltips(options) {
var _grid;
var _self = this;
var _defaults = {
maxToolTipLength: null
};
function init(grid) {
options = $.extend(true, {}, _defaults, options);
_grid = grid;
_grid.onMouseEnter.subscribe(handleMouseEnter);
}
function destroy() {
_grid.onMouseEnter.unsubscribe(handleMouseEnter);
}
function handleMouseEnter(e, args) {
var cell = _grid.getCellFromEvent(e);
if (cell) {
var node = _grid.getCellNode(cell.row, cell.cell);
if ($(node).innerWidth() < node.scrollWidth) {
var text = $.trim($(node).text());
if (options.maxToolTipLength && text.length > options.maxToolTipLength) {
text = text.substr(0, options.maxToolTipLength - 3) + "...";
}
$(node).attr("title", text);
} else {
$(node).attr("title", "");
}
}
}
$.extend(this, {
"init": init,
"destroy": destroy
});
// Register namespace
$.extend(true, window, {
"Slick": {
"AutoTooltips": AutoTooltips
}
});
/**
* AutoTooltips plugin to show/hide tooltips when columns are too narrow to fit content.
* @constructor
* @param {boolean} [options.enableForCells=true] - Enable tooltip for grid cells
* @param {boolean} [options.enableForHeaderCells=false] - Enable tooltip for header cells
* @param {number} [options.maxToolTipLength=null] - The maximum length for a tooltip
*/
function AutoTooltips(options) {
var _grid;
var _self = this;
var _defaults = {
enableForCells: true,
enableForHeaderCells: false,
maxToolTipLength: null
};
/**
* Initialize plugin.
*/
function init(grid) {
options = $.extend(true, {}, _defaults, options);
_grid = grid;
if (options.enableForCells) _grid.onMouseEnter.subscribe(handleMouseEnter);
if (options.enableForHeaderCells) _grid.onHeaderMouseEnter.subscribe(handleHeaderMouseEnter);
}
/**
* Destroy plugin.
*/
function destroy() {
if (options.enableForCells) _grid.onMouseEnter.unsubscribe(handleMouseEnter);
if (options.enableForHeaderCells) _grid.onHeaderMouseEnter.unsubscribe(handleHeaderMouseEnter);
}
/**
* Handle mouse entering grid cell to add/remove tooltip.
* @param {jQuery.Event} e - The event
*/
function handleMouseEnter(e) {
var cell = _grid.getCellFromEvent(e);
if (cell) {
var $node = $(_grid.getCellNode(cell.row, cell.cell));
var text;
if ($node.innerWidth() < $node[0].scrollWidth) {
text = $.trim($node.text());
if (options.maxToolTipLength && text.length > options.maxToolTipLength) {
text = text.substr(0, options.maxToolTipLength - 3) + "...";
}
} else {
text = "";
}
$node.attr("title", text);
}
}
/**
* Handle mouse entering header cell to add/remove tooltip.
* @param {jQuery.Event} e - The event
* @param {object} args.column - The column definition
*/
function handleHeaderMouseEnter(e, args) {
var column = args.column,
$node = $(e.target).closest(".slick-header-column");
if (!column.toolTip) {
$node.attr("title", ($node.innerWidth() < $node[0].scrollWidth) ? column.name : "");
}
}
// Public API
$.extend(this, {
"init": init,
"destroy": destroy
});
}
})(jQuery);

View File

@ -1,64 +1,66 @@
(function ($) {
// register namespace
$.extend(true, window, {
"Slick": {
"CellRangeDecorator": CellRangeDecorator
}
});
/***
* Displays an overlay on top of a given cell range.
*
* TODO:
* Currently, it blocks mouse events to DOM nodes behind it.
* Use FF and WebKit-specific "pointer-events" CSS style, or some kind of event forwarding.
* Could also construct the borders separately using 4 individual DIVs.
*
* @param {Grid} grid
* @param {Object} options
*/
function CellRangeDecorator(grid, options) {
var _elem;
var _defaults = {
selectionCss: {
"zIndex": "9999",
"border": "2px dashed red"
}
};
options = $.extend(true, {}, _defaults, options);
function show(range) {
if (!_elem) {
_elem = $("<div></div>", {css: options.selectionCss})
.css("position", "absolute")
.appendTo(grid.getCanvasNode());
}
var from = grid.getCellNodeBox(range.fromRow, range.fromCell);
var to = grid.getCellNodeBox(range.toRow, range.toCell);
_elem.css({
top: from.top - 1,
left: from.left - 1,
height: to.bottom - from.top - 2,
width: to.right - from.left - 2
});
return _elem;
}
function hide() {
if (_elem) {
_elem.remove();
_elem = null;
}
}
$.extend(this, {
"show": show,
"hide": hide
});
// register namespace
$.extend(true, window, {
"Slick": {
"CellRangeDecorator": CellRangeDecorator
}
});
/***
* Displays an overlay on top of a given cell range.
*
* TODO:
* Currently, it blocks mouse events to DOM nodes behind it.
* Use FF and WebKit-specific "pointer-events" CSS style, or some kind of event forwarding.
* Could also construct the borders separately using 4 individual DIVs.
*
* @param {Grid} grid
* @param {Object} options
*/
function CellRangeDecorator(grid, options) {
var _elem;
var _defaults = {
selectionCssClass: 'slick-range-decorator',
selectionCss: {
"zIndex": "9999",
"border": "2px dashed red"
}
};
options = $.extend(true, {}, _defaults, options);
function show(range) {
if (!_elem) {
_elem = $("<div></div>", {css: options.selectionCss})
.addClass(options.selectionCssClass)
.css("position", "absolute")
.appendTo(grid.getCanvasNode());
}
var from = grid.getCellNodeBox(range.fromRow, range.fromCell);
var to = grid.getCellNodeBox(range.toRow, range.toCell);
_elem.css({
top: from.top - 1,
left: from.left - 1,
height: to.bottom - from.top - 2,
width: to.right - from.left - 2
});
return _elem;
}
function hide() {
if (_elem) {
_elem.remove();
_elem = null;
}
}
$.extend(this, {
"show": show,
"hide": hide
});
}
})(jQuery);

View File

@ -1,111 +1,113 @@
(function ($) {
// register namespace
$.extend(true, window, {
"Slick": {
"CellRangeSelector": CellRangeSelector
}
});
function CellRangeSelector(options) {
var _grid;
var _canvas;
var _dragging;
var _decorator;
var _self = this;
var _defaults = {
selectionCss: {
"border": "2px dashed blue"
}
};
function init(grid) {
options = $.extend(true, {}, _defaults, options);
_decorator = new Slick.CellRangeDecorator(grid, options);
_grid = grid;
_canvas = _grid.getCanvasNode();
_grid.onDragInit.subscribe(handleDragInit);
_grid.onDragStart.subscribe(handleDragStart);
_grid.onDrag.subscribe(handleDrag);
_grid.onDragEnd.subscribe(handleDragEnd);
}
function destroy() {
_grid.onDragInit.unsubscribe(handleDragInit);
_grid.onDragStart.unsubscribe(handleDragStart);
_grid.onDrag.unsubscribe(handleDrag);
_grid.onDragEnd.unsubscribe(handleDragEnd);
}
function handleDragInit(e, dd) {
// prevent the grid from cancelling drag'n'drop by default
e.stopImmediatePropagation();
}
function handleDragStart(e, dd) {
var cell = _grid.getCellFromEvent(e);
if (_self.onBeforeCellRangeSelected.notify(cell) !== false) {
if (_grid.canCellBeSelected(cell.row, cell.cell)) {
_dragging = true;
e.stopImmediatePropagation();
}
}
if (!_dragging) {
return;
}
var start = _grid.getCellFromPoint(
dd.startX - $(_canvas).offset().left,
dd.startY - $(_canvas).offset().top);
dd.range = {start: start, end: {}};
return _decorator.show(new Slick.Range(start.row, start.cell));
}
function handleDrag(e, dd) {
if (!_dragging) {
return;
}
e.stopImmediatePropagation();
var end = _grid.getCellFromPoint(
e.pageX - $(_canvas).offset().left,
e.pageY - $(_canvas).offset().top);
if (!_grid.canCellBeSelected(end.row, end.cell)) {
return;
}
dd.range.end = end;
_decorator.show(new Slick.Range(dd.range.start.row, dd.range.start.cell, end.row, end.cell));
}
function handleDragEnd(e, dd) {
if (!_dragging) {
return;
}
_dragging = false;
e.stopImmediatePropagation();
_decorator.hide();
_self.onCellRangeSelected.notify({
range: new Slick.Range(
dd.range.start.row,
dd.range.start.cell,
dd.range.end.row,
dd.range.end.cell
)
});
}
$.extend(this, {
"init": init,
"destroy": destroy,
"onBeforeCellRangeSelected": new Slick.Event(),
"onCellRangeSelected": new Slick.Event()
});
// register namespace
$.extend(true, window, {
"Slick": {
"CellRangeSelector": CellRangeSelector
}
});
function CellRangeSelector(options) {
var _grid;
var _canvas;
var _dragging;
var _decorator;
var _self = this;
var _handler = new Slick.EventHandler();
var _defaults = {
selectionCss: {
"border": "2px dashed blue"
}
};
function init(grid) {
options = $.extend(true, {}, _defaults, options);
_decorator = new Slick.CellRangeDecorator(grid, options);
_grid = grid;
_canvas = _grid.getCanvasNode();
_handler
.subscribe(_grid.onDragInit, handleDragInit)
.subscribe(_grid.onDragStart, handleDragStart)
.subscribe(_grid.onDrag, handleDrag)
.subscribe(_grid.onDragEnd, handleDragEnd);
}
function destroy() {
_handler.unsubscribeAll();
}
function handleDragInit(e, dd) {
// prevent the grid from cancelling drag'n'drop by default
e.stopImmediatePropagation();
}
function handleDragStart(e, dd) {
var cell = _grid.getCellFromEvent(e);
if (_self.onBeforeCellRangeSelected.notify(cell) !== false) {
if (_grid.canCellBeSelected(cell.row, cell.cell)) {
_dragging = true;
e.stopImmediatePropagation();
}
}
if (!_dragging) {
return;
}
_grid.focus();
var start = _grid.getCellFromPoint(
dd.startX - $(_canvas).offset().left,
dd.startY - $(_canvas).offset().top);
dd.range = {start: start, end: {}};
return _decorator.show(new Slick.Range(start.row, start.cell));
}
function handleDrag(e, dd) {
if (!_dragging) {
return;
}
e.stopImmediatePropagation();
var end = _grid.getCellFromPoint(
e.pageX - $(_canvas).offset().left,
e.pageY - $(_canvas).offset().top);
if (!_grid.canCellBeSelected(end.row, end.cell)) {
return;
}
dd.range.end = end;
_decorator.show(new Slick.Range(dd.range.start.row, dd.range.start.cell, end.row, end.cell));
}
function handleDragEnd(e, dd) {
if (!_dragging) {
return;
}
_dragging = false;
e.stopImmediatePropagation();
_decorator.hide();
_self.onCellRangeSelected.notify({
range: new Slick.Range(
dd.range.start.row,
dd.range.start.cell,
dd.range.end.row,
dd.range.end.cell
)
});
}
$.extend(this, {
"init": init,
"destroy": destroy,
"onBeforeCellRangeSelected": new Slick.Event(),
"onCellRangeSelected": new Slick.Event()
});
}
})(jQuery);

View File

@ -1,90 +1,154 @@
(function ($) {
// register namespace
$.extend(true, window, {
"Slick": {
"CellSelectionModel": CellSelectionModel
}
});
function CellSelectionModel(options) {
var _grid;
var _canvas;
var _ranges = [];
var _self = this;
var _selector = new Slick.CellRangeSelector({
"selectionCss": {
"border": "2px solid black"
}
});
var _options;
var _defaults = {
selectActiveCell: true
};
function init(grid) {
_options = $.extend(true, {}, _defaults, options);
_grid = grid;
_canvas = _grid.getCanvasNode();
_grid.onActiveCellChanged.subscribe(handleActiveCellChange);
grid.registerPlugin(_selector);
_selector.onCellRangeSelected.subscribe(handleCellRangeSelected);
_selector.onBeforeCellRangeSelected.subscribe(handleBeforeCellRangeSelected);
}
function destroy() {
_grid.onActiveCellChanged.unsubscribe(handleActiveCellChange);
_selector.onCellRangeSelected.unsubscribe(handleCellRangeSelected);
_selector.onBeforeCellRangeSelected.unsubscribe(handleBeforeCellRangeSelected);
_grid.unregisterPlugin(_selector);
}
function removeInvalidRanges(ranges) {
var result = [];
for (var i = 0; i < ranges.length; i++) {
var r = ranges[i];
if (_grid.canCellBeSelected(r.fromRow, r.fromCell) && _grid.canCellBeSelected(r.toRow, r.toCell)) {
result.push(r);
}
}
return result;
}
function setSelectedRanges(ranges) {
_ranges = removeInvalidRanges(ranges);
_self.onSelectedRangesChanged.notify(_ranges);
}
function getSelectedRanges() {
return _ranges;
}
function handleBeforeCellRangeSelected(e, args) {
if (_grid.getEditorLock().isActive()) {
e.stopPropagation();
return false;
}
}
function handleCellRangeSelected(e, args) {
setSelectedRanges([args.range]);
}
function handleActiveCellChange(e, args) {
if (_options.selectActiveCell) {
setSelectedRanges([new Slick.Range(args.row, args.cell)]);
}
}
$.extend(this, {
"getSelectedRanges": getSelectedRanges,
"setSelectedRanges": setSelectedRanges,
"init": init,
"destroy": destroy,
"onSelectedRangesChanged": new Slick.Event()
});
// register namespace
$.extend(true, window, {
"Slick": {
"CellSelectionModel": CellSelectionModel
}
});
function CellSelectionModel(options) {
var _grid;
var _canvas;
var _ranges = [];
var _self = this;
var _selector = new Slick.CellRangeSelector({
"selectionCss": {
"border": "2px solid black"
}
});
var _options;
var _defaults = {
selectActiveCell: true
};
function init(grid) {
_options = $.extend(true, {}, _defaults, options);
_grid = grid;
_canvas = _grid.getCanvasNode();
_grid.onActiveCellChanged.subscribe(handleActiveCellChange);
_grid.onKeyDown.subscribe(handleKeyDown);
grid.registerPlugin(_selector);
_selector.onCellRangeSelected.subscribe(handleCellRangeSelected);
_selector.onBeforeCellRangeSelected.subscribe(handleBeforeCellRangeSelected);
}
function destroy() {
_grid.onActiveCellChanged.unsubscribe(handleActiveCellChange);
_grid.onKeyDown.unsubscribe(handleKeyDown);
_selector.onCellRangeSelected.unsubscribe(handleCellRangeSelected);
_selector.onBeforeCellRangeSelected.unsubscribe(handleBeforeCellRangeSelected);
_grid.unregisterPlugin(_selector);
}
function removeInvalidRanges(ranges) {
var result = [];
for (var i = 0; i < ranges.length; i++) {
var r = ranges[i];
if (_grid.canCellBeSelected(r.fromRow, r.fromCell) && _grid.canCellBeSelected(r.toRow, r.toCell)) {
result.push(r);
}
}
return result;
}
function setSelectedRanges(ranges) {
_ranges = removeInvalidRanges(ranges);
_self.onSelectedRangesChanged.notify(_ranges);
}
function getSelectedRanges() {
return _ranges;
}
function handleBeforeCellRangeSelected(e, args) {
if (_grid.getEditorLock().isActive()) {
e.stopPropagation();
return false;
}
}
function handleCellRangeSelected(e, args) {
setSelectedRanges([args.range]);
}
function handleActiveCellChange(e, args) {
if (_options.selectActiveCell && args.row != null && args.cell != null) {
setSelectedRanges([new Slick.Range(args.row, args.cell)]);
}
}
function handleKeyDown(e) {
/***
* Кey codes
* 37 left
* 38 up
* 39 right
* 40 down
*/
var ranges, last;
var active = _grid.getActiveCell();
if ( active && e.shiftKey && !e.ctrlKey && !e.altKey &&
(e.which == 37 || e.which == 39 || e.which == 38 || e.which == 40) ) {
ranges = getSelectedRanges();
if (!ranges.length)
ranges.push(new Slick.Range(active.row, active.cell));
// keyboard can work with last range only
last = ranges.pop();
// can't handle selection out of active cell
if (!last.contains(active.row, active.cell))
last = new Slick.Range(active.row, active.cell);
var dRow = last.toRow - last.fromRow,
dCell = last.toCell - last.fromCell,
// walking direction
dirRow = active.row == last.fromRow ? 1 : -1,
dirCell = active.cell == last.fromCell ? 1 : -1;
if (e.which == 37) {
dCell -= dirCell;
} else if (e.which == 39) {
dCell += dirCell ;
} else if (e.which == 38) {
dRow -= dirRow;
} else if (e.which == 40) {
dRow += dirRow;
}
// define new selection range
var new_last = new Slick.Range(active.row, active.cell, active.row + dirRow*dRow, active.cell + dirCell*dCell);
if (removeInvalidRanges([new_last]).length) {
ranges.push(new_last);
var viewRow = dirRow > 0 ? new_last.toRow : new_last.fromRow;
var viewCell = dirCell > 0 ? new_last.toCell : new_last.fromCell;
_grid.scrollRowIntoView(viewRow);
_grid.scrollCellIntoView(viewRow, viewCell);
}
else
ranges.push(last);
setSelectedRanges(ranges);
e.preventDefault();
e.stopPropagation();
}
}
$.extend(this, {
"getSelectedRanges": getSelectedRanges,
"setSelectedRanges": setSelectedRanges,
"init": init,
"destroy": destroy,
"onSelectedRangesChanged": new Slick.Event()
});
}
})(jQuery);

View File

@ -1,184 +1,187 @@
(function ($) {
// register namespace
$.extend(true, window, {
"Slick": {
"RowSelectionModel": RowSelectionModel
}
});
function RowSelectionModel(options) {
var _grid;
var _ranges = [];
var _self = this;
var _handler = new Slick.EventHandler();
var _inHandler;
var _options;
var _defaults = {
selectActiveRow: true
};
function init(grid) {
_options = $.extend(true, {}, _defaults, options);
_grid = grid;
_handler.subscribe(_grid.onActiveCellChanged,
wrapHandler(handleActiveCellChange));
_handler.subscribe(_grid.onKeyDown,
wrapHandler(handleKeyDown));
_handler.subscribe(_grid.onClick,
wrapHandler(handleClick));
}
function destroy() {
_handler.unsubscribeAll();
}
function wrapHandler(handler) {
return function () {
if (!_inHandler) {
_inHandler = true;
handler.apply(this, arguments);
_inHandler = false;
}
};
}
function rangesToRows(ranges) {
var rows = [];
for (var i = 0; i < ranges.length; i++) {
for (var j = ranges[i].fromRow; j <= ranges[i].toRow; j++) {
rows.push(j);
}
}
return rows;
}
function rowsToRanges(rows) {
var ranges = [];
var lastCell = _grid.getColumns().length - 1;
for (var i = 0; i < rows.length; i++) {
ranges.push(new Slick.Range(rows[i], 0, rows[i], lastCell));
}
return ranges;
}
function getRowsRange(from, to) {
var i, rows = [];
for (i = from; i <= to; i++) {
rows.push(i);
}
for (i = to; i < from; i++) {
rows.push(i);
}
return rows;
}
function getSelectedRows() {
return rangesToRows(_ranges);
}
function setSelectedRows(rows) {
setSelectedRanges(rowsToRanges(rows));
}
function setSelectedRanges(ranges) {
_ranges = ranges;
_self.onSelectedRangesChanged.notify(_ranges);
}
function getSelectedRanges() {
return _ranges;
}
function handleActiveCellChange(e, data) {
if (_options.selectActiveRow) {
setSelectedRanges([new Slick.Range(data.row, 0, data.row, _grid.getColumns().length - 1)]);
}
}
function handleKeyDown(e) {
var activeRow = _grid.getActiveCell();
if (activeRow && e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey && (e.which == 38 || e.which == 40)) {
var selectedRows = getSelectedRows();
selectedRows.sort(function (x, y) {
return x - y
});
if (!selectedRows.length) {
selectedRows = [activeRow.row];
}
var top = selectedRows[0];
var bottom = selectedRows[selectedRows.length - 1];
var active;
if (e.which == 40) {
active = activeRow.row < bottom || top == bottom ? ++bottom : ++top;
} else {
active = activeRow.row < bottom ? --bottom : --top;
}
if (active >= 0 && active < _grid.getDataLength()) {
_grid.scrollRowIntoView(active);
_ranges = rowsToRanges(getRowsRange(top, bottom));
setSelectedRanges(_ranges);
}
e.preventDefault();
e.stopPropagation();
}
}
function handleClick(e) {
var cell = _grid.getCellFromEvent(e);
if (!cell || !_grid.canCellBeActive(cell.row, cell.cell)) {
return false;
}
var selection = rangesToRows(_ranges);
var idx = $.inArray(cell.row, selection);
if (!e.ctrlKey && !e.shiftKey && !e.metaKey) {
return false;
}
else if (_grid.getOptions().multiSelect) {
if (idx === -1 && (e.ctrlKey || e.metaKey)) {
selection.push(cell.row);
_grid.setActiveCell(cell.row, cell.cell);
} else if (idx !== -1 && (e.ctrlKey || e.metaKey)) {
selection = $.grep(selection, function (o, i) {
return (o !== cell.row);
});
_grid.setActiveCell(cell.row, cell.cell);
} else if (selection.length && e.shiftKey) {
var last = selection.pop();
var from = Math.min(cell.row, last);
var to = Math.max(cell.row, last);
selection = [];
for (var i = from; i <= to; i++) {
if (i !== last) {
selection.push(i);
}
}
selection.push(last);
_grid.setActiveCell(cell.row, cell.cell);
}
}
_ranges = rowsToRanges(selection);
setSelectedRanges(_ranges);
e.stopImmediatePropagation();
return true;
}
$.extend(this, {
"getSelectedRows": getSelectedRows,
"setSelectedRows": setSelectedRows,
"getSelectedRanges": getSelectedRanges,
"setSelectedRanges": setSelectedRanges,
"init": init,
"destroy": destroy,
"onSelectedRangesChanged": new Slick.Event()
});
// register namespace
$.extend(true, window, {
"Slick": {
"RowSelectionModel": RowSelectionModel
}
});
function RowSelectionModel(options) {
var _grid;
var _ranges = [];
var _self = this;
var _handler = new Slick.EventHandler();
var _inHandler;
var _options;
var _defaults = {
selectActiveRow: true
};
function init(grid) {
_options = $.extend(true, {}, _defaults, options);
_grid = grid;
_handler.subscribe(_grid.onActiveCellChanged,
wrapHandler(handleActiveCellChange));
_handler.subscribe(_grid.onKeyDown,
wrapHandler(handleKeyDown));
_handler.subscribe(_grid.onClick,
wrapHandler(handleClick));
}
function destroy() {
_handler.unsubscribeAll();
}
function wrapHandler(handler) {
return function () {
if (!_inHandler) {
_inHandler = true;
handler.apply(this, arguments);
_inHandler = false;
}
};
}
function rangesToRows(ranges) {
var rows = [];
for (var i = 0; i < ranges.length; i++) {
for (var j = ranges[i].fromRow; j <= ranges[i].toRow; j++) {
rows.push(j);
}
}
return rows;
}
function rowsToRanges(rows) {
var ranges = [];
var lastCell = _grid.getColumns().length - 1;
for (var i = 0; i < rows.length; i++) {
ranges.push(new Slick.Range(rows[i], 0, rows[i], lastCell));
}
return ranges;
}
function getRowsRange(from, to) {
var i, rows = [];
for (i = from; i <= to; i++) {
rows.push(i);
}
for (i = to; i < from; i++) {
rows.push(i);
}
return rows;
}
function getSelectedRows() {
return rangesToRows(_ranges);
}
function setSelectedRows(rows) {
setSelectedRanges(rowsToRanges(rows));
}
function setSelectedRanges(ranges) {
_ranges = ranges;
_self.onSelectedRangesChanged.notify(_ranges);
}
function getSelectedRanges() {
return _ranges;
}
function handleActiveCellChange(e, data) {
if (_options.selectActiveRow && data.row != null) {
setSelectedRanges([new Slick.Range(data.row, 0, data.row, _grid.getColumns().length - 1)]);
}
}
function handleKeyDown(e) {
var activeRow = _grid.getActiveCell();
if (activeRow && e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey && (e.which == 38 || e.which == 40)) {
var selectedRows = getSelectedRows();
selectedRows.sort(function (x, y) {
return x - y
});
if (!selectedRows.length) {
selectedRows = [activeRow.row];
}
var top = selectedRows[0];
var bottom = selectedRows[selectedRows.length - 1];
var active;
if (e.which == 40) {
active = activeRow.row < bottom || top == bottom ? ++bottom : ++top;
} else {
active = activeRow.row < bottom ? --bottom : --top;
}
if (active >= 0 && active < _grid.getDataLength()) {
_grid.scrollRowIntoView(active);
_ranges = rowsToRanges(getRowsRange(top, bottom));
setSelectedRanges(_ranges);
}
e.preventDefault();
e.stopPropagation();
}
}
function handleClick(e) {
var cell = _grid.getCellFromEvent(e);
if (!cell || !_grid.canCellBeActive(cell.row, cell.cell)) {
return false;
}
if (!_grid.getOptions().multiSelect || (
!e.ctrlKey && !e.shiftKey && !e.metaKey)) {
return false;
}
var selection = rangesToRows(_ranges);
var idx = $.inArray(cell.row, selection);
if (idx === -1 && (e.ctrlKey || e.metaKey)) {
selection.push(cell.row);
_grid.setActiveCell(cell.row, cell.cell);
} else if (idx !== -1 && (e.ctrlKey || e.metaKey)) {
selection = $.grep(selection, function (o, i) {
return (o !== cell.row);
});
_grid.setActiveCell(cell.row, cell.cell);
} else if (selection.length && e.shiftKey) {
var last = selection.pop();
var from = Math.min(cell.row, last);
var to = Math.max(cell.row, last);
selection = [];
for (var i = from; i <= to; i++) {
if (i !== last) {
selection.push(i);
}
}
selection.push(last);
_grid.setActiveCell(cell.row, cell.cell);
}
_ranges = rowsToRanges(selection);
setSelectedRanges(_ranges);
e.stopImmediatePropagation();
return true;
}
$.extend(this, {
"getSelectedRows": getSelectedRows,
"setSelectedRows": setSelectedRows,
"getSelectedRanges": getSelectedRanges,
"setSelectedRanges": setSelectedRanges,
"init": init,
"destroy": destroy,
"onSelectedRangesChanged": new Slick.Event()
});
}
})(jQuery);

View File

@ -5,419 +5,463 @@
*/
(function ($) {
// register namespace
$.extend(true, window, {
"Slick": {
"Event": Event,
"EventData": EventData,
"EventHandler": EventHandler,
"Range": Range,
"NonDataRow": NonDataItem,
"Group": Group,
"GroupTotals": GroupTotals,
"EditorLock": EditorLock,
/***
* A global singleton editor lock.
* @class GlobalEditorLock
* @static
* @constructor
*/
"GlobalEditorLock": new EditorLock()
}
});
// register namespace
$.extend(true, window, {
"Slick": {
"Event": Event,
"EventData": EventData,
"EventHandler": EventHandler,
"Range": Range,
"NonDataRow": NonDataItem,
"Group": Group,
"GroupTotals": GroupTotals,
"EditorLock": EditorLock,
/***
* A global singleton editor lock.
* @class GlobalEditorLock
* @static
* @constructor
*/
"GlobalEditorLock": new EditorLock()
}
});
/***
* An event object for passing data to event handlers and letting them control propagation.
* <p>This is pretty much identical to how W3C and jQuery implement events.</p>
* @class EventData
* @constructor
*/
function EventData() {
var isPropagationStopped = false;
var isImmediatePropagationStopped = false;
/***
* An event object for passing data to event handlers and letting them control propagation.
* <p>This is pretty much identical to how W3C and jQuery implement events.</p>
* @class EventData
* @constructor
* Stops event from propagating up the DOM tree.
* @method stopPropagation
*/
function EventData() {
var isPropagationStopped = false;
var isImmediatePropagationStopped = false;
/***
* Stops event from propagating up the DOM tree.
* @method stopPropagation
*/
this.stopPropagation = function () {
isPropagationStopped = true;
};
/***
* Returns whether stopPropagation was called on this event object.
* @method isPropagationStopped
* @return {Boolean}
*/
this.isPropagationStopped = function () {
return isPropagationStopped;
};
/***
* Prevents the rest of the handlers from being executed.
* @method stopImmediatePropagation
*/
this.stopImmediatePropagation = function () {
isImmediatePropagationStopped = true;
};
/***
* Returns whether stopImmediatePropagation was called on this event object.\
* @method isImmediatePropagationStopped
* @return {Boolean}
*/
this.isImmediatePropagationStopped = function () {
return isImmediatePropagationStopped;
}
}
/***
* A simple publisher-subscriber implementation.
* @class Event
* @constructor
*/
function Event() {
var handlers = [];
/***
* Adds an event handler to be called when the event is fired.
* <p>Event handler will receive two arguments - an <code>EventData</code> and the <code>data</code>
* object the event was fired with.<p>
* @method subscribe
* @param fn {Function} Event handler.
*/
this.subscribe = function (fn) {
handlers.push(fn);
};
/***
* Removes an event handler added with <code>subscribe(fn)</code>.
* @method unsubscribe
* @param fn {Function} Event handler to be removed.
*/
this.unsubscribe = function (fn) {
for (var i = handlers.length - 1; i >= 0; i--) {
if (handlers[i] === fn) {
handlers.splice(i, 1);
}
}
};
/***
* Fires an event notifying all subscribers.
* @method notify
* @param args {Object} Additional data object to be passed to all handlers.
* @param e {EventData}
* Optional.
* An <code>EventData</code> object to be passed to all handlers.
* For DOM events, an existing W3C/jQuery event object can be passed in.
* @param scope {Object}
* Optional.
* The scope ("this") within which the handler will be executed.
* If not specified, the scope will be set to the <code>Event</code> instance.
*/
this.notify = function (args, e, scope) {
e = e || new EventData();
scope = scope || this;
var returnValue;
for (var i = 0; i < handlers.length && !(e.isPropagationStopped() || e.isImmediatePropagationStopped()); i++) {
returnValue = handlers[i].call(scope, e, args);
}
return returnValue;
};
}
function EventHandler() {
var handlers = [];
this.subscribe = function (event, handler) {
handlers.push({
event: event,
handler: handler
});
event.subscribe(handler);
};
this.unsubscribe = function (event, handler) {
var i = handlers.length;
while (i--) {
if (handlers[i].event === event &&
handlers[i].handler === handler) {
handlers.splice(i, 1);
event.unsubscribe(handler);
return;
}
}
};
this.unsubscribeAll = function () {
var i = handlers.length;
while (i--) {
handlers[i].event.unsubscribe(handlers[i].handler);
}
handlers = [];
}
}
/***
* A structure containing a range of cells.
* @class Range
* @constructor
* @param fromRow {Integer} Starting row.
* @param fromCell {Integer} Starting cell.
* @param toRow {Integer} Optional. Ending row. Defaults to <code>fromRow</code>.
* @param toCell {Integer} Optional. Ending cell. Defaults to <code>fromCell</code>.
*/
function Range(fromRow, fromCell, toRow, toCell) {
if (toRow === undefined && toCell === undefined) {
toRow = fromRow;
toCell = fromCell;
}
/***
* @property fromRow
* @type {Integer}
*/
this.fromRow = Math.min(fromRow, toRow);
/***
* @property fromCell
* @type {Integer}
*/
this.fromCell = Math.min(fromCell, toCell);
/***
* @property toRow
* @type {Integer}
*/
this.toRow = Math.max(fromRow, toRow);
/***
* @property toCell
* @type {Integer}
*/
this.toCell = Math.max(fromCell, toCell);
/***
* Returns whether a range represents a single row.
* @method isSingleRow
* @return {Boolean}
*/
this.isSingleRow = function () {
return this.fromRow == this.toRow;
};
/***
* Returns whether a range represents a single cell.
* @method isSingleCell
* @return {Boolean}
*/
this.isSingleCell = function () {
return this.fromRow == this.toRow && this.fromCell == this.toCell;
};
/***
* Returns whether a range contains a given cell.
* @method contains
* @param row {Integer}
* @param cell {Integer}
* @return {Boolean}
*/
this.contains = function (row, cell) {
return row >= this.fromRow && row <= this.toRow &&
cell >= this.fromCell && cell <= this.toCell;
};
/***
* Returns a readable representation of a range.
* @method toString
* @return {String}
*/
this.toString = function () {
if (this.isSingleCell()) {
return "(" + this.fromRow + ":" + this.fromCell + ")";
}
else {
return "(" + this.fromRow + ":" + this.fromCell + " - " + this.toRow + ":" + this.toCell + ")";
}
}
}
/***
* A base class that all special / non-data rows (like Group and GroupTotals) derive from.
* @class NonDataItem
* @constructor
*/
function NonDataItem() {
this.__nonDataRow = true;
}
/***
* Information about a group of rows.
* @class Group
* @extends Slick.NonDataItem
* @constructor
*/
function Group() {
this.__group = true;
this.__updated = false;
/***
* Number of rows in the group.
* @property count
* @type {Integer}
*/
this.count = 0;
/***
* Grouping value.
* @property value
* @type {Object}
*/
this.value = null;
/***
* Formatted display value of the group.
* @property title
* @type {String}
*/
this.title = null;
/***
* Whether a group is collapsed.
* @property collapsed
* @type {Boolean}
*/
this.collapsed = false;
/***
* GroupTotals, if any.
* @property totals
* @type {GroupTotals}
*/
this.totals = null;
}
Group.prototype = new NonDataItem();
/***
* Compares two Group instances.
* @method equals
* @return {Boolean}
* @param group {Group} Group instance to compare to.
*/
Group.prototype.equals = function (group) {
return this.value === group.value &&
this.count === group.count &&
this.collapsed === group.collapsed;
this.stopPropagation = function () {
isPropagationStopped = true;
};
/***
* Information about group totals.
* An instance of GroupTotals will be created for each totals row and passed to the aggregators
* so that they can store arbitrary data in it. That data can later be accessed by group totals
* formatters during the display.
* @class GroupTotals
* @extends Slick.NonDataItem
* @constructor
* Returns whether stopPropagation was called on this event object.
* @method isPropagationStopped
* @return {Boolean}
*/
function GroupTotals() {
this.__groupTotals = true;
/***
* Parent Group.
* @param group
* @type {Group}
*/
this.group = null;
}
GroupTotals.prototype = new NonDataItem();
this.isPropagationStopped = function () {
return isPropagationStopped;
};
/***
* A locking helper to track the active edit controller and ensure that only a single controller
* can be active at a time. This prevents a whole class of state and validation synchronization
* issues. An edit controller (such as SlickGrid) can query if an active edit is in progress
* and attempt a commit or cancel before proceeding.
* @class EditorLock
* @constructor
* Prevents the rest of the handlers from being executed.
* @method stopImmediatePropagation
*/
function EditorLock() {
var activeEditController = null;
this.stopImmediatePropagation = function () {
isImmediatePropagationStopped = true;
};
/***
* Returns true if a specified edit controller is active (has the edit lock).
* If the parameter is not specified, returns true if any edit controller is active.
* @method isActive
* @param editController {EditController}
* @return {Boolean}
*/
this.isActive = function (editController) {
return (editController ? activeEditController === editController : activeEditController !== null);
};
/***
* Sets the specified edit controller as the active edit controller (acquire edit lock).
* If another edit controller is already active, and exception will be thrown.
* @method activate
* @param editController {EditController} edit controller acquiring the lock
*/
this.activate = function (editController) {
if (editController === activeEditController) { // already activated?
return;
}
if (activeEditController !== null) {
throw "SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController";
}
if (!editController.commitCurrentEdit) {
throw "SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()";
}
if (!editController.cancelCurrentEdit) {
throw "SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()";
}
activeEditController = editController;
};
/***
* Unsets the specified edit controller as the active edit controller (release edit lock).
* If the specified edit controller is not the active one, an exception will be thrown.
* @method deactivate
* @param editController {EditController} edit controller releasing the lock
*/
this.deactivate = function (editController) {
if (activeEditController !== editController) {
throw "SlickGrid.EditorLock.deactivate: specified editController is not the currently active one";
}
activeEditController = null;
};
/***
* Attempts to commit the current edit by calling "commitCurrentEdit" method on the active edit
* controller and returns whether the commit attempt was successful (commit may fail due to validation
* errors, etc.). Edit controller's "commitCurrentEdit" must return true if the commit has succeeded
* and false otherwise. If no edit controller is active, returns true.
* @method commitCurrentEdit
* @return {Boolean}
*/
this.commitCurrentEdit = function () {
return (activeEditController ? activeEditController.commitCurrentEdit() : true);
};
/***
* Attempts to cancel the current edit by calling "cancelCurrentEdit" method on the active edit
* controller and returns whether the edit was successfully cancelled. If no edit controller is
* active, returns true.
* @method cancelCurrentEdit
* @return {Boolean}
*/
this.cancelCurrentEdit = function cancelCurrentEdit() {
return (activeEditController ? activeEditController.cancelCurrentEdit() : true);
};
/***
* Returns whether stopImmediatePropagation was called on this event object.\
* @method isImmediatePropagationStopped
* @return {Boolean}
*/
this.isImmediatePropagationStopped = function () {
return isImmediatePropagationStopped;
}
}
/***
* A simple publisher-subscriber implementation.
* @class Event
* @constructor
*/
function Event() {
var handlers = [];
/***
* Adds an event handler to be called when the event is fired.
* <p>Event handler will receive two arguments - an <code>EventData</code> and the <code>data</code>
* object the event was fired with.<p>
* @method subscribe
* @param fn {Function} Event handler.
*/
this.subscribe = function (fn) {
handlers.push(fn);
};
/***
* Removes an event handler added with <code>subscribe(fn)</code>.
* @method unsubscribe
* @param fn {Function} Event handler to be removed.
*/
this.unsubscribe = function (fn) {
for (var i = handlers.length - 1; i >= 0; i--) {
if (handlers[i] === fn) {
handlers.splice(i, 1);
}
}
};
/***
* Fires an event notifying all subscribers.
* @method notify
* @param args {Object} Additional data object to be passed to all handlers.
* @param e {EventData}
* Optional.
* An <code>EventData</code> object to be passed to all handlers.
* For DOM events, an existing W3C/jQuery event object can be passed in.
* @param scope {Object}
* Optional.
* The scope ("this") within which the handler will be executed.
* If not specified, the scope will be set to the <code>Event</code> instance.
*/
this.notify = function (args, e, scope) {
e = e || new EventData();
scope = scope || this;
var returnValue;
for (var i = 0; i < handlers.length && !(e.isPropagationStopped() || e.isImmediatePropagationStopped()); i++) {
returnValue = handlers[i].call(scope, e, args);
}
return returnValue;
};
}
function EventHandler() {
var handlers = [];
this.subscribe = function (event, handler) {
handlers.push({
event: event,
handler: handler
});
event.subscribe(handler);
return this; // allow chaining
};
this.unsubscribe = function (event, handler) {
var i = handlers.length;
while (i--) {
if (handlers[i].event === event &&
handlers[i].handler === handler) {
handlers.splice(i, 1);
event.unsubscribe(handler);
return;
}
}
return this; // allow chaining
};
this.unsubscribeAll = function () {
var i = handlers.length;
while (i--) {
handlers[i].event.unsubscribe(handlers[i].handler);
}
handlers = [];
return this; // allow chaining
}
}
/***
* A structure containing a range of cells.
* @class Range
* @constructor
* @param fromRow {Integer} Starting row.
* @param fromCell {Integer} Starting cell.
* @param toRow {Integer} Optional. Ending row. Defaults to <code>fromRow</code>.
* @param toCell {Integer} Optional. Ending cell. Defaults to <code>fromCell</code>.
*/
function Range(fromRow, fromCell, toRow, toCell) {
if (toRow === undefined && toCell === undefined) {
toRow = fromRow;
toCell = fromCell;
}
/***
* @property fromRow
* @type {Integer}
*/
this.fromRow = Math.min(fromRow, toRow);
/***
* @property fromCell
* @type {Integer}
*/
this.fromCell = Math.min(fromCell, toCell);
/***
* @property toRow
* @type {Integer}
*/
this.toRow = Math.max(fromRow, toRow);
/***
* @property toCell
* @type {Integer}
*/
this.toCell = Math.max(fromCell, toCell);
/***
* Returns whether a range represents a single row.
* @method isSingleRow
* @return {Boolean}
*/
this.isSingleRow = function () {
return this.fromRow == this.toRow;
};
/***
* Returns whether a range represents a single cell.
* @method isSingleCell
* @return {Boolean}
*/
this.isSingleCell = function () {
return this.fromRow == this.toRow && this.fromCell == this.toCell;
};
/***
* Returns whether a range contains a given cell.
* @method contains
* @param row {Integer}
* @param cell {Integer}
* @return {Boolean}
*/
this.contains = function (row, cell) {
return row >= this.fromRow && row <= this.toRow &&
cell >= this.fromCell && cell <= this.toCell;
};
/***
* Returns a readable representation of a range.
* @method toString
* @return {String}
*/
this.toString = function () {
if (this.isSingleCell()) {
return "(" + this.fromRow + ":" + this.fromCell + ")";
}
else {
return "(" + this.fromRow + ":" + this.fromCell + " - " + this.toRow + ":" + this.toCell + ")";
}
}
}
/***
* A base class that all special / non-data rows (like Group and GroupTotals) derive from.
* @class NonDataItem
* @constructor
*/
function NonDataItem() {
this.__nonDataRow = true;
}
/***
* Information about a group of rows.
* @class Group
* @extends Slick.NonDataItem
* @constructor
*/
function Group() {
this.__group = true;
/**
* Grouping level, starting with 0.
* @property level
* @type {Number}
*/
this.level = 0;
/***
* Number of rows in the group.
* @property count
* @type {Integer}
*/
this.count = 0;
/***
* Grouping value.
* @property value
* @type {Object}
*/
this.value = null;
/***
* Formatted display value of the group.
* @property title
* @type {String}
*/
this.title = null;
/***
* Whether a group is collapsed.
* @property collapsed
* @type {Boolean}
*/
this.collapsed = false;
/***
* GroupTotals, if any.
* @property totals
* @type {GroupTotals}
*/
this.totals = null;
/**
* Rows that are part of the group.
* @property rows
* @type {Array}
*/
this.rows = [];
/**
* Sub-groups that are part of the group.
* @property groups
* @type {Array}
*/
this.groups = null;
/**
* A unique key used to identify the group. This key can be used in calls to DataView
* collapseGroup() or expandGroup().
* @property groupingKey
* @type {Object}
*/
this.groupingKey = null;
}
Group.prototype = new NonDataItem();
/***
* Compares two Group instances.
* @method equals
* @return {Boolean}
* @param group {Group} Group instance to compare to.
*/
Group.prototype.equals = function (group) {
return this.value === group.value &&
this.count === group.count &&
this.collapsed === group.collapsed &&
this.title === group.title;
};
/***
* Information about group totals.
* An instance of GroupTotals will be created for each totals row and passed to the aggregators
* so that they can store arbitrary data in it. That data can later be accessed by group totals
* formatters during the display.
* @class GroupTotals
* @extends Slick.NonDataItem
* @constructor
*/
function GroupTotals() {
this.__groupTotals = true;
/***
* Parent Group.
* @param group
* @type {Group}
*/
this.group = null;
/***
* Whether the totals have been fully initialized / calculated.
* Will be set to false for lazy-calculated group totals.
* @param initialized
* @type {Boolean}
*/
this.initialized = false;
}
GroupTotals.prototype = new NonDataItem();
/***
* A locking helper to track the active edit controller and ensure that only a single controller
* can be active at a time. This prevents a whole class of state and validation synchronization
* issues. An edit controller (such as SlickGrid) can query if an active edit is in progress
* and attempt a commit or cancel before proceeding.
* @class EditorLock
* @constructor
*/
function EditorLock() {
var activeEditController = null;
/***
* Returns true if a specified edit controller is active (has the edit lock).
* If the parameter is not specified, returns true if any edit controller is active.
* @method isActive
* @param editController {EditController}
* @return {Boolean}
*/
this.isActive = function (editController) {
return (editController ? activeEditController === editController : activeEditController !== null);
};
/***
* Sets the specified edit controller as the active edit controller (acquire edit lock).
* If another edit controller is already active, and exception will be thrown.
* @method activate
* @param editController {EditController} edit controller acquiring the lock
*/
this.activate = function (editController) {
if (editController === activeEditController) { // already activated?
return;
}
if (activeEditController !== null) {
throw "SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController";
}
if (!editController.commitCurrentEdit) {
throw "SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()";
}
if (!editController.cancelCurrentEdit) {
throw "SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()";
}
activeEditController = editController;
};
/***
* Unsets the specified edit controller as the active edit controller (release edit lock).
* If the specified edit controller is not the active one, an exception will be thrown.
* @method deactivate
* @param editController {EditController} edit controller releasing the lock
*/
this.deactivate = function (editController) {
if (activeEditController !== editController) {
throw "SlickGrid.EditorLock.deactivate: specified editController is not the currently active one";
}
activeEditController = null;
};
/***
* Attempts to commit the current edit by calling "commitCurrentEdit" method on the active edit
* controller and returns whether the commit attempt was successful (commit may fail due to validation
* errors, etc.). Edit controller's "commitCurrentEdit" must return true if the commit has succeeded
* and false otherwise. If no edit controller is active, returns true.
* @method commitCurrentEdit
* @return {Boolean}
*/
this.commitCurrentEdit = function () {
return (activeEditController ? activeEditController.commitCurrentEdit() : true);
};
/***
* Attempts to cancel the current edit by calling "cancelCurrentEdit" method on the active edit
* controller and returns whether the edit was successfully cancelled. If no edit controller is
* active, returns true.
* @method cancelCurrentEdit
* @return {Boolean}
*/
this.cancelCurrentEdit = function cancelCurrentEdit() {
return (activeEditController ? activeEditController.cancelCurrentEdit() : true);
};
}
})(jQuery);

View File

@ -1,55 +1,59 @@
/***
* Contains basic SlickGrid formatters.
*
* NOTE: These are merely examples. You will most likely need to implement something more
* robust/extensible/localizable/etc. for your use!
*
* @module Formatters
* @namespace Slick
*/
(function ($) {
// register namespace
$.extend(true, window, {
"Slick": {
"Formatters": {
"PercentComplete": PercentCompleteFormatter,
"PercentCompleteBar": PercentCompleteBarFormatter,
"YesNo": YesNoFormatter,
"Checkmark": CheckmarkFormatter
}
}
});
// register namespace
$.extend(true, window, {
"Slick": {
"Formatters": {
"PercentComplete": PercentCompleteFormatter,
"PercentCompleteBar": PercentCompleteBarFormatter,
"YesNo": YesNoFormatter,
"Checkmark": CheckmarkFormatter
}
}
});
function PercentCompleteFormatter(row, cell, value, columnDef, dataContext) {
if (value == null || value === "") {
return "-";
} else if (value < 50) {
return "<span style='color:red;font-weight:bold;'>" + value + "%</span>";
} else {
return "<span style='color:green'>" + value + "%</span>";
}
function PercentCompleteFormatter(row, cell, value, columnDef, dataContext) {
if (value == null || value === "") {
return "-";
} else if (value < 50) {
return "<span style='color:red;font-weight:bold;'>" + value + "%</span>";
} else {
return "<span style='color:green'>" + value + "%</span>";
}
}
function PercentCompleteBarFormatter(row, cell, value, columnDef, dataContext) {
if (value == null || value === "") {
return "";
}
function PercentCompleteBarFormatter(row, cell, value, columnDef, dataContext) {
if (value == null || value === "") {
return "";
}
var color;
var color;
if (value < 30) {
color = "red";
} else if (value < 70) {
color = "silver";
} else {
color = "green";
}
return "<span class='percent-complete-bar' style='background:" + color + ";width:" + value + "%'></span>";
if (value < 30) {
color = "red";
} else if (value < 70) {
color = "silver";
} else {
color = "green";
}
function YesNoFormatter(row, cell, value, columnDef, dataContext) {
return value ? "Yes" : "No";
}
return "<span class='percent-complete-bar' style='background:" + color + ";width:" + value + "%'></span>";
}
function CheckmarkFormatter(row, cell, value, columnDef, dataContext) {
return value ? "<img src='../images/tick.png'>" : "";
}
function YesNoFormatter(row, cell, value, columnDef, dataContext) {
return value ? "Yes" : "No";
}
function CheckmarkFormatter(row, cell, value, columnDef, dataContext) {
return value ? "<img src='../images/tick.png'>" : "";
}
})(jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -112,14 +112,14 @@ nf.BulletinBoard = (function () {
type: 'GET',
url: config.urls.controllerAbout,
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
var aboutDetails = response.about;
var bulletinBoardTitle = aboutDetails.title + ' Bulletin Board';
// set the document title and the about title
document.title = bulletinBoardTitle;
$('#bulletin-board-header-text').text(bulletinBoardTitle);
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
// get the banners if we're not in the shell
var loadBanners = $.Deferred(function (deferred) {
@ -128,7 +128,7 @@ nf.BulletinBoard = (function () {
type: 'GET',
url: config.urls.banners,
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
// ensure the banners response is specified
if (nf.Common.isDefinedAndNotNull(response.banners)) {
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
@ -160,7 +160,7 @@ nf.BulletinBoard = (function () {
}
deferred.resolve();
}, function (xhr, status, error) {
}).fail(function (xhr, status, error) {
nf.Common.handleAjaxError(xhr, status, error);
deferred.reject();
});
@ -170,9 +170,9 @@ nf.BulletinBoard = (function () {
});
return $.Deferred(function (deferred) {
$.when(getTitle, loadBanners).then(function () {
$.when(getTitle, loadBanners).done(function () {
deferred.resolve();
}, function () {
}).fail(function () {
deferred.reject();
});
}).promise();
@ -294,7 +294,7 @@ nf.BulletinBoard = (function () {
url: config.urls.bulletinBoard,
data: data,
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
// ensure the bulletin board was specified
if (nf.Common.isDefinedAndNotNull(response.bulletinBoard)) {
var bulletinBoard = response.bulletinBoard;
@ -369,7 +369,7 @@ nf.BulletinBoard = (function () {
bulletinContainer.prepend('<div class="bulletin-action">&#8230;</div>');
}
}
}, function (xhr, status, error) {
}).fail(function (xhr, status, error) {
// likely caused by a invalid regex
if (xhr.status === 404) {
$('#bulletin-error-message').text(xhr.responseText).show();

View File

@ -40,10 +40,10 @@ nf.Actions = (function () {
url: uri,
data: data,
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
}, function (xhr, status, error) {
}).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
nf.Dialog.showOkDialog({
dialogContent: nf.Common.escapeHtml(xhr.responseText),
@ -86,12 +86,14 @@ nf.Actions = (function () {
nf.CanvasUtils.enterGroup(selectionData.component.id);
}
},
/**
* Exits the current process group but entering the parent group.
*/
leaveGroup: function () {
nf.CanvasUtils.enterGroup(nf.Canvas.getParentGroupId());
},
/**
* Refresh the flow of the remote process group in the specified selection.
*
@ -153,6 +155,7 @@ nf.Actions = (function () {
poll(1);
}
},
/**
* Opens the remote process group in the specified selection.
*
@ -172,6 +175,7 @@ nf.Actions = (function () {
}
}
},
/**
* Shows and selects the source of the connection in the specified selection.
*
@ -190,6 +194,7 @@ nf.Actions = (function () {
}
}
},
/**
* Shows and selects the destination of the connection in the specified selection.
*
@ -208,6 +213,7 @@ nf.Actions = (function () {
}
}
},
/**
* Shows the downstream components from the specified selection.
*
@ -230,6 +236,7 @@ nf.Actions = (function () {
}
}
},
/**
* Shows the upstream components from the specified selection.
*
@ -252,6 +259,7 @@ nf.Actions = (function () {
}
}
},
/**
* Shows and selects the component in the specified selection.
*
@ -268,6 +276,7 @@ nf.Actions = (function () {
nf.Actions.center(selection);
}
},
/**
* Selects all components in the specified selection.
*
@ -276,12 +285,14 @@ nf.Actions = (function () {
select: function (selection) {
selection.classed('selected', true);
},
/**
* Selects all components.
*/
selectAll: function () {
nf.Actions.select(d3.selectAll('g.component, g.connection'));
},
/**
* Centers the component in the specified selection.
*
@ -331,6 +342,7 @@ nf.Actions = (function () {
});
}
},
/**
* Enables all eligible selected components.
*/
@ -360,6 +372,7 @@ nf.Actions = (function () {
});
}
},
/**
* Disables all eligible selected components.
*/
@ -389,6 +402,7 @@ nf.Actions = (function () {
});
}
},
/**
* Starts the components in the specified selection.
*
@ -443,6 +457,7 @@ nf.Actions = (function () {
}
}
},
/**
* Stops the components in the specified selection.
*
@ -496,6 +511,7 @@ nf.Actions = (function () {
}
}
},
/**
* Enables transmission for the components in the specified selection.
*
@ -513,6 +529,7 @@ nf.Actions = (function () {
});
});
},
/**
* Disables transmission for the components in the specified selection.
*
@ -530,6 +547,7 @@ nf.Actions = (function () {
});
});
},
/**
* Shows the configuration dialog for the specified selection.
*
@ -557,6 +575,7 @@ nf.Actions = (function () {
}
}
},
// Defines an action for showing component details (like configuration but read only).
showDetails: function (selection) {
if (selection.size() === 1) {
@ -579,6 +598,7 @@ nf.Actions = (function () {
}
}
},
/**
* Shows the usage documentation for the component in the specified selection.
*
@ -592,6 +612,7 @@ nf.Actions = (function () {
}));
}
},
/**
* Shows the stats for the specified selection.
*
@ -623,6 +644,7 @@ nf.Actions = (function () {
}
}
},
/**
* Opens the remote ports dialog for the remote process group in the specified selection.
*
@ -633,6 +655,7 @@ nf.Actions = (function () {
nf.RemoteProcessGroupPorts.showPorts(selection);
}
},
/**
* Hides and open cancellable dialogs.
*/
@ -646,12 +669,14 @@ nf.Actions = (function () {
}
});
},
/**
* Reloads the status for the entire canvas (components and flow.)
*/
reloadStatus: function () {
nf.Canvas.reloadStatus();
},
/**
* Deletes the component in the specified selection.
*
@ -675,7 +700,7 @@ nf.Actions = (function () {
clientId: revision.clientId
}),
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@ -723,15 +748,15 @@ nf.Actions = (function () {
// refresh the birdseye/toolbar
nf.Birdseye.refresh();
nf.CanvasToolbar.refresh();
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
} else {
// create a snippet for the specified component and link to the data flow
var snippetDetails = nf.Snippet.marshal(selection, true);
nf.Snippet.create(snippetDetails).then(function (response) {
nf.Snippet.create(snippetDetails).done(function (response) {
var snippet = response.snippet;
// remove the snippet, effectively removing the components
nf.Snippet.remove(snippet.id).then(function () {
nf.Snippet.remove(snippet.id).done(function () {
var components = d3.map();
// add the id to the type's array
@ -797,7 +822,7 @@ nf.Actions = (function () {
// refresh the birdseye/toolbar
nf.Birdseye.refresh();
nf.CanvasToolbar.refresh();
}, function (xhr, status, error) {
}).fail(function (xhr, status, error) {
// unable to acutally remove the components so attempt to
// unlink and remove just the snippet - if unlinking fails
// just ignore
@ -807,10 +832,11 @@ nf.Actions = (function () {
nf.Common.handleAjaxError(xhr, status, error);
});
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
}
}
},
/**
* Opens the fill color dialog for the component in the specified selection.
*
@ -842,6 +868,7 @@ nf.Actions = (function () {
$('#fill-color-dialog').modal('show');
}
},
/**
* Groups the currently selected components into a new group.
*/
@ -865,6 +892,7 @@ nf.Actions = (function () {
});
});
},
/**
* Creates a new template based off the currently selected components. If no components
* are selected, a template of the entire canvas is made.
@ -914,7 +942,7 @@ nf.Actions = (function () {
var snippetDetails = nf.Snippet.marshal(selection, false);
// create the snippet
nf.Snippet.create(snippetDetails).then(function (response) {
nf.Snippet.create(snippetDetails).done(function (response) {
var snippet = response.snippet;
// create the template
@ -927,21 +955,21 @@ nf.Actions = (function () {
snippetId: snippet.id
},
dataType: 'json'
}).then(function () {
}).done(function () {
// show the confirmation dialog
nf.Dialog.showOkDialog({
dialogContent: "Template '" + nf.Common.escapeHtml(templateName) + "' was successfully created.",
overlayBackground: false
});
}, nf.Common.handleAjaxError).always(function () {
}).always(function () {
// remove the snippet
nf.Snippet.remove(snippet.id);
// clear the template dialog fields
$('#new-template-name').val('');
$('#new-template-description').val('');
});
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
}
}
}, {
@ -956,6 +984,7 @@ nf.Actions = (function () {
// auto focus on the template name
$('#new-template-name').focus();
},
/**
* Copies the component in the specified selection.
*
@ -975,6 +1004,7 @@ nf.Actions = (function () {
origin: origin
});
},
/**
* Pastes the currently copied selection.
*
@ -1009,7 +1039,7 @@ nf.Actions = (function () {
};
// create a snippet from the details
nf.Snippet.create(data['snippet']).then(function (createResponse) {
nf.Snippet.create(data['snippet']).done(function (createResponse) {
var snippet = createResponse.snippet;
// determine the origin of the bounding box of the copy
@ -1024,7 +1054,7 @@ nf.Actions = (function () {
}
// copy the snippet to the new location
nf.Snippet.copy(snippet.id, nf.Canvas.getGroupId(), origin).then(function (copyResponse) {
nf.Snippet.copy(snippet.id, nf.Canvas.getGroupId(), origin).done(function (copyResponse) {
var snippetContents = copyResponse.contents;
// update the graph accordingly
@ -1039,7 +1069,7 @@ nf.Actions = (function () {
// remove the original snippet
nf.Snippet.remove(snippet.id).fail(reject);
}, function () {
}).fail(function () {
// an error occured while performing the copy operation, reload the
// graph in case it was a partial success
nf.Canvas.reload().done(function () {
@ -1054,7 +1084,7 @@ nf.Actions = (function () {
// reject the deferred
reject();
});
}, reject);
}).fail(reject);
}).promise();
// show the appropriate message is the copy fails
@ -1067,6 +1097,7 @@ nf.Actions = (function () {
});
});
},
/**
* Moves the connection in the specified selection to the front.
*

View File

@ -335,6 +335,7 @@ nf.Birdseye = (function () {
})
.call(brush);
},
/**
* Handles rendering of the birdseye tool.
*/

View File

@ -103,7 +103,7 @@ nf.CanvasHeader = (function () {
// setup the refresh link actions
$('#refresh-required-link').click(function () {
nf.Canvas.reload().then(function () {
nf.Canvas.reload().done(function () {
// update component visibility
nf.Canvas.View.updateVisibility();
@ -113,7 +113,7 @@ nf.CanvasHeader = (function () {
// hide the refresh link
$('#stats-last-refreshed').removeClass('alert');
$('#refresh-required-container').hide();
}, function () {
}).fail(function () {
nf.Dialog.showOkDialog({
dialogContent: 'Unable to refresh the current group.',
overlayBackground: true
@ -126,12 +126,12 @@ nf.CanvasHeader = (function () {
type: 'GET',
url: config.urls.controllerAbout,
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
var aboutDetails = response.about;
// set the document title and the about title
document.title = aboutDetails.title;
$('#nf-version').text(aboutDetails.version);
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
// configure the about dialog
$('#nf-about').modal({
@ -192,7 +192,7 @@ nf.CanvasHeader = (function () {
'style[background-color]': color
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@ -202,7 +202,7 @@ nf.CanvasHeader = (function () {
} else {
nf.Label.set(response.label);
}
}, function (xhr, status, error) {
}).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
nf.Dialog.showOkDialog({
dialogContent: nf.Common.escapeHtml(xhr.responseText),

View File

@ -95,6 +95,7 @@ nf.CanvasToolbar = (function () {
});
}
},
/**
* Called when the selection changes to update the toolbar appropriately.
*/

View File

@ -394,7 +394,7 @@ nf.CanvasToolbox = (function () {
y: pt.y
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.processor)) {
// update the revision
nf.Client.setRevision(response.revision);
@ -410,7 +410,7 @@ nf.CanvasToolbox = (function () {
// update the birdseye
nf.Birdseye.refresh();
}
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
};
/**
@ -481,7 +481,7 @@ nf.CanvasToolbox = (function () {
y: pt.y
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.inputPort)) {
// update the revision
nf.Client.setRevision(response.revision);
@ -497,7 +497,7 @@ nf.CanvasToolbox = (function () {
// update the birdseye
nf.Birdseye.refresh();
}
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
};
/**
@ -568,7 +568,7 @@ nf.CanvasToolbox = (function () {
y: pt.y
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.outputPort)) {
// update the revision
nf.Client.setRevision(response.revision);
@ -584,7 +584,7 @@ nf.CanvasToolbox = (function () {
// update the birdseye
nf.Birdseye.refresh();
}
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
};
/**
@ -608,7 +608,7 @@ nf.CanvasToolbox = (function () {
y: pt.y
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.processGroup)) {
// update the revision
nf.Client.setRevision(response.revision);
@ -624,7 +624,7 @@ nf.CanvasToolbox = (function () {
// update the birdseye
nf.Birdseye.refresh();
}
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
};
/**
@ -692,7 +692,7 @@ nf.CanvasToolbox = (function () {
y: pt.y
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.remoteProcessGroup)) {
// update the revision
nf.Client.setRevision(response.revision);
@ -708,7 +708,7 @@ nf.CanvasToolbox = (function () {
// update the birdseye
nf.Birdseye.refresh();
}
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
};
/**
@ -730,7 +730,7 @@ nf.CanvasToolbox = (function () {
y: pt.y
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.funnel)) {
// update the revision
nf.Client.setRevision(response.revision);
@ -743,7 +743,7 @@ nf.CanvasToolbox = (function () {
// update the birdseye
nf.Birdseye.refresh();
}
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
};
/**
@ -756,7 +756,7 @@ nf.CanvasToolbox = (function () {
type: 'GET',
url: config.urls.templates,
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
var templates = response.templates;
if (nf.Common.isDefinedAndNotNull(templates) && templates.length > 0) {
var options = [];
@ -809,7 +809,7 @@ nf.CanvasToolbox = (function () {
});
}
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
};
/**
@ -833,7 +833,7 @@ nf.CanvasToolbox = (function () {
originY: pt.y
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@ -845,7 +845,7 @@ nf.CanvasToolbox = (function () {
// update the birdseye
nf.Birdseye.refresh();
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
};
/**
@ -869,7 +869,7 @@ nf.CanvasToolbox = (function () {
height: nf.Label.config.height
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.label)) {
// update the revision
nf.Client.setRevision(response.revision);
@ -880,7 +880,7 @@ nf.CanvasToolbox = (function () {
// update the birdseye
nf.Birdseye.refresh();
}
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
};
return {
@ -987,7 +987,7 @@ nf.CanvasToolbox = (function () {
type: 'GET',
url: config.urls.processorTypes,
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
var tagCloud = {};
var tags = [];
@ -1090,7 +1090,7 @@ nf.CanvasToolbox = (function () {
processorTypesGrid.render();
});
processorTypesData.syncGridSelection(processorTypesGrid, false);
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
// define the function for filtering the list
$('#processor-type-filter').keyup(function () {
@ -1146,6 +1146,7 @@ nf.CanvasToolbox = (function () {
$('<div/>').attr('title', nf.Common.config.type.label).addClass('label-icon-disable').addClass('toolbox-icon').appendTo(toolbox);
}
},
/**
* Prompts the user to enter the name for the group.
*
@ -1162,9 +1163,9 @@ nf.CanvasToolbox = (function () {
$('#new-process-group-name').val('');
// create the group and resolve the deferred accordingly
$.when(createGroup(groupName, pt)).then(function (response) {
createGroup(groupName, pt).done(function (response) {
deferred.resolve(response.processGroup);
}, function () {
}).fail(function () {
deferred.reject();
});
};

View File

@ -91,6 +91,7 @@ nf.CanvasUtils = (function () {
}
}
},
/**
* Calculates the point on the specified bounding box that is closest to the
* specified point.
@ -151,6 +152,7 @@ nf.CanvasUtils = (function () {
};
}
},
/**
* Shows the specified component in the specified group.
*
@ -165,9 +167,9 @@ nf.CanvasUtils = (function () {
// load a different group if necessary
if (groupId !== nf.Canvas.getGroupId()) {
nf.Canvas.setGroupId(groupId);
nf.Canvas.reload().then(function () {
nf.Canvas.reload().done(function () {
deferred.resolve();
}, function () {
}).fail(function () {
nf.Dialog.showOkDialog({
dialogContent: 'Unable to load the group for the specified component.',
overlayBackground: false
@ -194,6 +196,7 @@ nf.CanvasUtils = (function () {
});
}
},
/**
* Gets the currently selected components and connections.
*
@ -221,6 +224,7 @@ nf.CanvasUtils = (function () {
// calculate the difference between the center point and the position of this component and convert to screen space
nf.Canvas.View.translate([(center[0] - boundingBox.x) * scale, (center[1] - boundingBox.y) * scale]);
},
/**
* Position the component accordingly.
*
@ -236,6 +240,7 @@ nf.CanvasUtils = (function () {
return 'translate(' + d.component.position.x + ', ' + d.component.position.y + ')';
});
},
/**
* Applies single line ellipsis to the component in the specified selection if necessary.
*
@ -271,6 +276,7 @@ nf.CanvasUtils = (function () {
selection.text(text.substring(0, i) + String.fromCharCode(8230));
}
},
/**
* Applies multiline ellipsis to the component in the specified seleciton. Text will
* wrap for the specified number of lines. The last line will be ellipsis if necessary.
@ -343,6 +349,7 @@ nf.CanvasUtils = (function () {
word = words.pop();
}
},
/**
* Updates the active thread count on the specified selection.
*
@ -388,6 +395,7 @@ nf.CanvasUtils = (function () {
selection.selectAll('text.active-thread-count, rect.active-thread-count-background').style('display', 'none');
}
},
/**
* Disables the default browser behavior of following image href when control clicking.
*
@ -400,6 +408,7 @@ nf.CanvasUtils = (function () {
}
});
},
/**
* Handles component bulletins.
*
@ -456,6 +465,7 @@ nf.CanvasUtils = (function () {
selection.selectAll('image.bulletin-icon').style('display', 'none');
}
},
/**
* Adds the specified tooltip to the specified target.
*
@ -473,6 +483,7 @@ nf.CanvasUtils = (function () {
tip.style('display', 'none');
});
},
/**
* Determines if the specified selection is a connection.
*
@ -481,6 +492,7 @@ nf.CanvasUtils = (function () {
isConnection: function (selection) {
return selection.classed('connection');
},
/**
* Determines if the specified selection is a remote process group.
*
@ -489,6 +501,7 @@ nf.CanvasUtils = (function () {
isRemoteProcessGroup: function (selection) {
return selection.classed('remote-process-group');
},
/**
* Determines if the specified selection is a processor.
*
@ -497,6 +510,7 @@ nf.CanvasUtils = (function () {
isProcessor: function (selection) {
return selection.classed('processor');
},
/**
* Determines if the specified selection is a label.
*
@ -505,6 +519,7 @@ nf.CanvasUtils = (function () {
isLabel: function (selection) {
return selection.classed('label');
},
/**
* Determines if the specified selection is an input port.
*
@ -513,6 +528,7 @@ nf.CanvasUtils = (function () {
isInputPort: function (selection) {
return selection.classed('input-port');
},
/**
* Determines if the specified selection is an output port.
*
@ -521,6 +537,7 @@ nf.CanvasUtils = (function () {
isOutputPort: function (selection) {
return selection.classed('output-port');
},
/**
* Determines if the specified selection is a process group.
*
@ -529,6 +546,7 @@ nf.CanvasUtils = (function () {
isProcessGroup: function (selection) {
return selection.classed('process-group');
},
/**
* Determines if the specified selection is a funnel.
*
@ -537,6 +555,7 @@ nf.CanvasUtils = (function () {
isFunnel: function (selection) {
return selection.classed('funnel');
},
/**
* Determines if the components in the specified selection are runnable.
*
@ -558,6 +577,7 @@ nf.CanvasUtils = (function () {
return runnable;
},
/**
* Determines if the component in the specified selection is runnable.
*
@ -578,6 +598,7 @@ nf.CanvasUtils = (function () {
return runnable;
},
/**
* Determines if the components in the specified selection are stoppable.
*
@ -599,6 +620,7 @@ nf.CanvasUtils = (function () {
return stoppable;
},
/**
* Determines if the component in the specified selection is runnable.
*
@ -617,6 +639,7 @@ nf.CanvasUtils = (function () {
return stoppable;
},
/**
* Determines if the specified selection can all start transmitting.
*
@ -637,6 +660,7 @@ nf.CanvasUtils = (function () {
});
return canStartTransmitting;
},
/**
* Determines if the specified selection supports starting transmission.
*
@ -645,6 +669,7 @@ nf.CanvasUtils = (function () {
canStartTransmitting: function (selection) {
return nf.CanvasUtils.isRemoteProcessGroup(selection);
},
/**
* Determines if the specified selection can all stop transmitting.
*
@ -665,6 +690,7 @@ nf.CanvasUtils = (function () {
});
return canStopTransmitting;
},
/**
* Determines if the specified selection can stop transmission.
*
@ -673,6 +699,7 @@ nf.CanvasUtils = (function () {
canStopTransmitting: function (selection) {
return nf.CanvasUtils.isRemoteProcessGroup(selection);
},
/**
* Determines whether the components in the specified selection are deletable.
*
@ -686,6 +713,7 @@ nf.CanvasUtils = (function () {
return nf.CanvasUtils.supportsModification(selection);
},
/**
* Determines whether the specified selection is in a state to support modification.
*
@ -741,6 +769,7 @@ nf.CanvasUtils = (function () {
}
return supportsModification;
},
/**
* Determines the connectable type for the specified source selection.
*
@ -761,6 +790,7 @@ nf.CanvasUtils = (function () {
}
return type;
},
/**
* Determines the connectable type for the specified destination selection.
*
@ -781,6 +811,7 @@ nf.CanvasUtils = (function () {
}
return type;
},
/**
* Determines if the graph is currently in a state to copy.
*
@ -813,12 +844,14 @@ nf.CanvasUtils = (function () {
// ensure everything selected is copyable
return selection.size() === copyable.size();
},
/**
* Determines if something is currently pastable.
*/
isPastable: function () {
return nf.Clipboard.isCopied();
},
/**
* Persists the current user view.
*/
@ -836,6 +869,7 @@ nf.CanvasUtils = (function () {
// store the item
nf.Storage.setItem(name, item);
},
/**
* Gets the name for this connection.
*
@ -849,6 +883,7 @@ nf.CanvasUtils = (function () {
}
return '';
},
/**
* Returns the component id of the source of this processor. If the connection is attached
* to a port in a [sub|remote] group, the component id will be that of the group. Otherwise
@ -863,6 +898,7 @@ nf.CanvasUtils = (function () {
}
return sourceId;
},
/**
* Returns the component id of the source of this processor. If the connection is attached
* to a port in a [sub|remote] group, the component id will be that of the group. Otherwise
@ -877,6 +913,7 @@ nf.CanvasUtils = (function () {
}
return destinationId;
},
/**
* Attempts to restore a persisted view. Returns a flag that indicates if the
* view was restored.
@ -911,6 +948,7 @@ nf.CanvasUtils = (function () {
return viewRestored;
},
/**
* Enters the specified group.
*
@ -944,6 +982,7 @@ nf.CanvasUtils = (function () {
});
});
},
/**
* Gets the origin of the bounding box for the specified selection.
*
@ -966,6 +1005,7 @@ nf.CanvasUtils = (function () {
return origin;
},
/**
* Moves the specified components into the specified group.
*
@ -979,11 +1019,11 @@ nf.CanvasUtils = (function () {
nf.CanvasUtils.eligibleForMove(components, group).done(function () {
// create a snippet for the specified components and link to the data flow
var snippetDetails = nf.Snippet.marshal(components, true);
nf.Snippet.create(snippetDetails).then(function (response) {
nf.Snippet.create(snippetDetails).done(function (response) {
var snippet = response.snippet;
// move the snippet into the target
nf.Snippet.move(snippet.id, groupData.component.id).then(function () {
nf.Snippet.move(snippet.id, groupData.component.id).done(function () {
var componentMap = d3.map();
// add the id to the type's array
@ -1006,16 +1046,17 @@ nf.CanvasUtils = (function () {
// reload the target group
nf.ProcessGroup.reload(groupData.component);
}, nf.Common.handleAjaxError).always(function () {
}).fail(nf.Common.handleAjaxError).always(function () {
// unable to acutally move the components so attempt to
// unlink and remove just the snippet
nf.Snippet.unlink(snippet.id).done(function () {
nf.Snippet.remove(snippet.id);
});
});
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
});
},
/**
* Removes any dangling edges. All components are retained as well as any
* edges whose source and destination are also retained.
@ -1053,6 +1094,7 @@ nf.CanvasUtils = (function () {
}
});
},
/**
* Determines if the specified selection is disconnected from other nodes.
*
@ -1098,6 +1140,7 @@ nf.CanvasUtils = (function () {
return isDisconnected;
},
/**
* Ensures components are eligible to be moved. The new target can be optionally specified.
*
@ -1138,7 +1181,7 @@ nf.CanvasUtils = (function () {
type: 'GET',
url: config.urls.controller + '/process-groups/' + encodeURIComponent(nf.Canvas.getParentGroupId()) + '/connections',
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
var connections = response.connections;
var conflictingPorts = [];
@ -1173,7 +1216,7 @@ nf.CanvasUtils = (function () {
portConnectionDeferred.resolve();
}
}, function () {
}).fail(function () {
portConnectionDeferred.reject();
});
}
@ -1193,7 +1236,7 @@ nf.CanvasUtils = (function () {
verbose: true
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
var processGroup = response.processGroup;
var processGroupContents = processGroup.contents;
@ -1224,24 +1267,24 @@ nf.CanvasUtils = (function () {
} else {
portNameDeferred.resolve();
}
}, function () {
}).fail(function () {
portNameDeferred.reject();
});
}).promise();
};
// execute the checks in order
$.when(portConnectionCheck()).then(function () {
portConnectionCheck().done(function () {
if (nf.Common.isDefinedAndNotNull(group)) {
$.when(portNameCheck()).then(function () {
$.when(portNameCheck()).done(function () {
deferred.resolve();
}, function () {
}).fail(function () {
deferred.reject();
});
} else {
deferred.resolve();
}
}, function () {
}).fail(function () {
deferred.reject();
});
} else {
@ -1249,6 +1292,7 @@ nf.CanvasUtils = (function () {
}
}).promise();
},
/**
* Determines if the component in the specified selection is a valid connection source.
*
@ -1264,6 +1308,7 @@ nf.CanvasUtils = (function () {
nf.CanvasUtils.isRemoteProcessGroup(selection) || nf.CanvasUtils.isInputPort(selection) ||
nf.CanvasUtils.isFunnel(selection);
},
/**
* Determines if the component in the specified selection is a valid connection destination.
*

View File

@ -170,7 +170,7 @@ nf.Canvas = (function () {
type: 'GET',
url: config.urls.revision,
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.revision)) {
var revision = response.revision;
var currentRevision = nf.Client.getRevision();
@ -187,7 +187,7 @@ nf.Canvas = (function () {
}
}
}
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
};
/**
@ -534,7 +534,7 @@ nf.Canvas = (function () {
type: 'GET',
url: config.urls.banners,
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
// ensure the banners response is specified
if (nf.Common.isDefinedAndNotNull(response.banners)) {
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
@ -558,7 +558,7 @@ nf.Canvas = (function () {
// update the graph dimensions
updateGraphSize();
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
};
/**
@ -614,7 +614,7 @@ nf.Canvas = (function () {
type: 'GET',
url: config.urls.status,
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
// report the updated status
if (nf.Common.isDefinedAndNotNull(response.controllerStatus)) {
var controllerStatus = response.controllerStatus;
@ -712,7 +712,7 @@ nf.Canvas = (function () {
$('#has-pending-accounts').hide();
}
}
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
};
/**
@ -729,7 +729,7 @@ nf.Canvas = (function () {
verbose: true
},
dataType: 'json'
}).then(function (processGroupResponse) {
}).done(function (processGroupResponse) {
// set the revision
nf.Client.setRevision(processGroupResponse.revision);
@ -759,7 +759,7 @@ nf.Canvas = (function () {
// update the toolbar
nf.CanvasToolbar.refresh();
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
};
/**
@ -777,7 +777,7 @@ nf.Canvas = (function () {
recursive: false
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
// report the updated stats
if (nf.Common.isDefinedAndNotNull(response.processGroupStatus)) {
var processGroupStatus = response.processGroupStatus;
@ -789,7 +789,7 @@ nf.Canvas = (function () {
$('#stats-last-refreshed').text(processGroupStatus.statsLastRefreshed);
}
deferred.resolve();
}, function (xhr, status, error) {
}).fail(function (xhr, status, error) {
// if clustered, a 404 likely means the flow status at the ncm is stale
if (!nf.Canvas.isClustered() || xhr.status !== 404) {
nf.Common.handleAjaxError(xhr, status, error);
@ -857,9 +857,9 @@ nf.Canvas = (function () {
}
// don't load the status until the graph is loaded
reloadStatus(nf.Canvas.getGroupId()).then(function () {
reloadStatus(nf.Canvas.getGroupId()).done(function () {
deferred.resolve(processGroupResult);
}, function () {
}).fail(function () {
deferred.reject();
});
});
@ -871,9 +871,9 @@ nf.Canvas = (function () {
reloadStatus: function () {
return $.Deferred(function (deferred) {
// refresh the status and check any bulletins
$.when(reloadStatus(nf.Canvas.getGroupId()), reloadFlowStatus()).then(function () {
$.when(reloadStatus(nf.Canvas.getGroupId()), reloadFlowStatus()).done(function () {
deferred.resolve();
}, function () {
}).fail(function () {
deferred.reject();
});
}).promise();
@ -900,13 +900,13 @@ nf.Canvas = (function () {
url: config.urls.cluster
}).done(function (response, status, xhr) {
clustered = true;
deferred.resolveWith(xhr, [response, status, xhr]);
deferred.resolve(response, status, xhr);
}).fail(function (xhr, status, error) {
if (xhr.status === 404) {
clustered = false;
deferred.resolveWith(xhr, ['', 'success', xhr]);
deferred.resolve('', 'success', xhr);
} else {
deferred.rejectWith(xhr, [xhr, status, error]);
deferred.reject(xhr, status, error);
}
});
}).promise();
@ -919,7 +919,7 @@ nf.Canvas = (function () {
});
// ensure the authorities and config request is processed first
$.when(authoritiesXhr, configXhr).then(function (authoritiesResult, configResult) {
$.when(authoritiesXhr, configXhr).done(function (authoritiesResult, configResult) {
var authoritiesResponse = authoritiesResult[0];
var configResponse = configResult[0];
@ -934,7 +934,7 @@ nf.Canvas = (function () {
var configDetails = configResponse.config;
// when both request complete, load the application
isClusteredRequest.then(function () {
isClusteredRequest.done(function () {
// get the auto refresh interval
var autoRefreshIntervalSeconds = parseInt(configDetails.autoRefreshIntervalSeconds, 10);
@ -942,7 +942,7 @@ nf.Canvas = (function () {
secureSiteToSite = configDetails.siteToSiteSecure;
// load d3
loadD3().then(function () {
loadD3().done(function () {
nf.Storage.init();
// initialize the application
@ -982,7 +982,7 @@ nf.Canvas = (function () {
nf.ConnectionDetails.init();
nf.RemoteProcessGroupDetails.init();
nf.GoTo.init();
nf.Graph.init().then(function () {
nf.Graph.init().done(function () {
// determine the split between the polling
var pollingSplit = autoRefreshIntervalSeconds / 2;
@ -994,10 +994,10 @@ nf.Canvas = (function () {
// hide the splash screen
nf.Canvas.hideSplash();
}, nf.Common.handleAjaxError);
}, nf.Common.handleAjaxError);
}, nf.Common.handleAjaxError);
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
},
/**
* Defines the gradient colors used to render processors.
@ -1214,6 +1214,7 @@ nf.Canvas = (function () {
// add the behavior to the canvas and disable dbl click zoom
svg.call(behavior).on('dblclick.zoom', null);
},
/**
* Whether or not a component should be rendered based solely on the current scale.
*
@ -1222,6 +1223,7 @@ nf.Canvas = (function () {
shouldRenderPerScale: function () {
return nf.Canvas.View.scale() >= MIN_SCALE_TO_RENDER;
},
/**
* Updates component visibility based on the current translation/scale.
*/
@ -1229,6 +1231,7 @@ nf.Canvas = (function () {
updateComponentVisibility();
nf.Graph.pan();
},
/**
* Sets/gets the current translation.
*
@ -1241,6 +1244,7 @@ nf.Canvas = (function () {
behavior.translate(translate);
}
},
/**
* Sets/gets the current scale.
*
@ -1253,6 +1257,7 @@ nf.Canvas = (function () {
behavior.scale(scale);
}
},
/**
* Zooms in a single zoom increment.
*/
@ -1277,6 +1282,7 @@ nf.Canvas = (function () {
height: 1
});
},
/**
* Zooms out a single zoom increment.
*/
@ -1301,6 +1307,7 @@ nf.Canvas = (function () {
height: 1
});
},
/**
* Zooms to fit the entire graph on the canvas.
*/
@ -1347,6 +1354,7 @@ nf.Canvas = (function () {
height: canvasHeight / newScale
});
},
/**
* Zooms to the actual size (1 to 1).
*/
@ -1395,6 +1403,7 @@ nf.Canvas = (function () {
// center as appropriate
nf.CanvasUtils.centerBoundingBox(box);
},
/**
* Refreshes the view based on the configured translation and scale.
*

View File

@ -34,6 +34,7 @@ nf.Clipboard = (function () {
addListener: function (listener, funct) {
listeners[listener] = funct;
},
/**
* Remove the specified listener.
*
@ -44,6 +45,7 @@ nf.Clipboard = (function () {
delete listeners[listener];
}
},
/**
* Copy the specified data.
*
@ -57,12 +59,14 @@ nf.Clipboard = (function () {
listeners[listener].call(listener, COPY, data);
}
},
/**
* Checks to see if any data has been copied.
*/
isCopied: function () {
return nf.Common.isDefinedAndNotNull(data);
},
/**
* Gets the most recent data thats copied. This operation
* will remove the corresponding data from the clipboard.

View File

@ -157,6 +157,7 @@ nf.Connectable = (function () {
d3.select(this).remove();
});
},
activate: function (components) {
components
.on('mouseenter.connectable', function (d) {

View File

@ -250,7 +250,7 @@ nf.ConnectionConfiguration = (function () {
verbose: true
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
var processGroup = response.processGroup;
var processGroupContents = processGroup.contents;
@ -301,7 +301,7 @@ nf.ConnectionConfiguration = (function () {
deferred.reject();
}
}, function (xhr, status, error) {
}).fail(function (xhr, status, error) {
// handle the error
nf.Common.handleAjaxError(xhr, status, error);
@ -327,7 +327,7 @@ nf.ConnectionConfiguration = (function () {
verbose: true
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
var remoteProcessGroup = response.remoteProcessGroup;
var remoteProcessGroupContents = remoteProcessGroup.contents;
@ -379,7 +379,7 @@ nf.ConnectionConfiguration = (function () {
deferred.reject();
}
}, function (xhr, status, error) {
}).fail(function (xhr, status, error) {
// handle the error
nf.Common.handleAjaxError(xhr, status, error);
@ -475,7 +475,7 @@ nf.ConnectionConfiguration = (function () {
verbose: true
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
var processGroup = response.processGroup;
var processGroupContents = processGroup.contents;
@ -526,7 +526,7 @@ nf.ConnectionConfiguration = (function () {
deferred.reject();
}
}, function (xhr, status, error) {
}).fail(function (xhr, status, error) {
// handle the error
nf.Common.handleAjaxError(xhr, status, error);
@ -551,7 +551,7 @@ nf.ConnectionConfiguration = (function () {
verbose: true
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
var remoteProcessGroup = response.remoteProcessGroup;
var remoteProcessGroupContents = remoteProcessGroup.contents;
@ -603,7 +603,7 @@ nf.ConnectionConfiguration = (function () {
deferred.reject();
}
}, function (xhr, status, error) {
}).fail(function (xhr, status, error) {
// handle the error
nf.Common.handleAjaxError(xhr, status, error);
@ -848,7 +848,7 @@ nf.ConnectionConfiguration = (function () {
destinationType: destinationType
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@ -876,7 +876,7 @@ nf.ConnectionConfiguration = (function () {
// update the birdseye
nf.Birdseye.refresh();
}, function (xhr, status, error) {
}).fail(function (xhr, status, error) {
// handle the error
nf.Common.handleAjaxError(xhr, status, error);
});
@ -935,7 +935,7 @@ nf.ConnectionConfiguration = (function () {
destinationGroupId: destinationGroupId
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.connection)) {
var connection = response.connection;
@ -959,7 +959,7 @@ nf.ConnectionConfiguration = (function () {
nf.RemoteProcessGroup.reload(destinationData.component);
}
}
}, function (xhr, status, error) {
}).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
nf.Dialog.showOkDialog({
dialogContent: nf.Common.escapeHtml(xhr.responseText),
@ -1128,7 +1128,7 @@ nf.ConnectionConfiguration = (function () {
type: 'GET',
url: config.urls.prioritizers,
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
// create an element for each available prioritizer
$.each(response.prioritizerTypes, function (i, documentedType) {
nf.ConnectionConfiguration.addAvailablePrioritizer('#prioritizer-available', documentedType);
@ -1142,8 +1142,9 @@ nf.ConnectionConfiguration = (function () {
opacity: 0.6
});
$('#prioritizer-available, #prioritizer-selected').disableSelection();
}, nf.Common.handleAjaxError);
}).fail(nf.Common.handleAjaxError);
},
/**
* Adds the specified prioritizer to the specified container.
*
@ -1165,6 +1166,7 @@ nf.ConnectionConfiguration = (function () {
}));
}
},
/**
* Shows the dialog for creating a new connection.
*
@ -1209,6 +1211,7 @@ nf.ConnectionConfiguration = (function () {
removeTempEdge();
});
},
/**
* Shows the configuration for the specified connection. If a destination is
* specified it will be considered a new destination.
@ -1232,7 +1235,7 @@ nf.ConnectionConfiguration = (function () {
}
// initialize the connection dialog
$.when(initializeSourceEditConnectionDialog(source), initializeDestinationEditConnectionDialog(destination)).then(function () {
$.when(initializeSourceEditConnectionDialog(source), initializeDestinationEditConnectionDialog(destination)).done(function () {
var availableRelationships = connection.availableRelationships;
var selectedRelationships = connection.selectedRelationships;
@ -1311,9 +1314,9 @@ nf.ConnectionConfiguration = (function () {
if (nf.CanvasUtils.isProcessor(source)) {
if (selectedRelationships.length > 0) {
// if there are relationships selected update
updateConnection(selectedRelationships).then(function () {
updateConnection(selectedRelationships).done(function () {
deferred.resolve();
}, function () {
}).fail(function () {
deferred.reject();
});
} else {
@ -1328,9 +1331,9 @@ nf.ConnectionConfiguration = (function () {
}
} else {
// there are no relationships, but the source wasn't a processor, so update anyway
updateConnection(undefined).then(function () {
updateConnection(undefined).done(function () {
deferred.resolve();
}, function () {
}).fail(function () {
deferred.reject();
});
}
@ -1366,7 +1369,7 @@ nf.ConnectionConfiguration = (function () {
if (relationshipNames.is(':visible') && relationshipNames.get(0).scrollHeight > relationshipNames.innerHeight()) {
relationshipNames.css('border-width', '1px');
}
}, function () {
}).fail(function () {
deferred.reject();
});
}).promise();

View File

@ -945,13 +945,13 @@ nf.Connection = (function () {
data: JSON.stringify(entity),
dataType: 'json',
contentType: 'application/json'
}).then(function (response) {
}).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
// request was successful, update the entry
nf.Connection.set(response.connection);
}, function (xhr, status, error) {
}).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
nf.Dialog.showOkDialog({
dialogContent: nf.Common.escapeHtml(xhr.responseText),
@ -973,6 +973,7 @@ nf.Connection = (function () {
selfLoopXOffset: (dimensions.width / 2) + 5,
selfLoopYOffset: 25
},
init: function () {
connectionMap = d3.map();
@ -1122,7 +1123,7 @@ nf.Connection = (function () {
url: connectionData.component.uri,
data: updatedConnectionData,
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
var connectionData = response.connection;
// update the revision
@ -1130,7 +1131,7 @@ nf.Connection = (function () {
// refresh to update the label
nf.Connection.set(connectionData);
}, function (xhr, status, error) {
}).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
nf.Dialog.showOkDialog({
dialogContent: nf.Common.escapeHtml(xhr.responseText),
@ -1268,6 +1269,7 @@ nf.Connection = (function () {
d3.event.sourceEvent.stopPropagation();
});
},
/**
* Populates the graph with the specified connections.
*
@ -1304,12 +1306,14 @@ nf.Connection = (function () {
// apply the selection and handle all new connection
select().enter().call(renderConnections, selectAll);
},
/**
* Reorders the connections based on their current z index.
*/
reorder: function () {
d3.selectAll('g.connection').call(sort);
},
/**
* Sets the value of the specified connection.
*
@ -1343,6 +1347,7 @@ nf.Connection = (function () {
set(connection);
}
},
/**
* Sets the connection status using the specified status.
*
@ -1364,6 +1369,7 @@ nf.Connection = (function () {
// update the visible connections
d3.selectAll('g.connection.visible').call(updateConnectionStatus);
},
/**
* Refreshes the connection in the UI.
*
@ -1376,12 +1382,14 @@ nf.Connection = (function () {
d3.selectAll('g.connection').call(updateConnections, true, true);
}
},
/**
* Refreshes the components necessary after a pan event.
*/
pan: function () {
d3.selectAll('g.connection.entering, g.connection.leaving').call(updateConnections, false, true);
},
/**
* Removes the specified connection.
*
@ -1399,12 +1407,14 @@ nf.Connection = (function () {
// apply the selection and handle all removed connections
select().exit().call(removeConnections);
},
/**
* Removes all processors.
*/
removeAll: function () {
nf.Connection.remove(connectionMap.keys());
},
/**
* Reloads the connection state from the server and refreshes the UI.
*
@ -1421,6 +1431,7 @@ nf.Connection = (function () {
});
}
},
/**
* Gets the connection that have a source or destination component with the specified id.
*
@ -1439,6 +1450,7 @@ nf.Connection = (function () {
});
return connections;
},
/**
* If the connection id is specified it is returned. If no connection id
* specified, all connections are returned.

View File

@ -417,12 +417,14 @@ nf.ContextMenu = (function () {
'y': position[1]
});
},
/**
* Hides the context menu.
*/
hide: function () {
$('#context-menu').hide();
},
/**
* Activates the context menu for the components in the specified selection.
*

View File

@ -57,7 +57,7 @@ nf.Draggable = (function () {
y: newPosition.y
},
dataType: 'json'
}).then(function (response) {
}).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@ -69,7 +69,7 @@ nf.Draggable = (function () {
type: d.type,
id: d.component.id
});
}, function (xhr, status, error) {
}).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
nf.Dialog.showOkDialog({
dialogContent: nf.Common.escapeHtml(xhr.responseText),
@ -114,7 +114,7 @@ nf.Draggable = (function () {
data: JSON.stringify(entity),
dataType: 'json',
contentType: 'application/json'
}).then(function (response) {
}).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@ -132,7 +132,7 @@ nf.Draggable = (function () {
type: d.type,
id: d.component.id
});
}, function (xhr, status, error) {
}).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
nf.Dialog.showOkDialog({
dialogContent: nf.Common.escapeHtml(xhr.responseText),
@ -300,6 +300,7 @@ nf.Draggable = (function () {
dragSelection.remove();
});
},
/**
* Activates the drag behavior for the components in the specified selection.
*

View File

@ -135,6 +135,7 @@ nf.Funnel = (function () {
'class': 'funnels'
});
},
/**
* Populates the graph with the specified funnels.
*
@ -165,6 +166,7 @@ nf.Funnel = (function () {
// apply the selection and handle all new processors
select().enter().call(renderFunnels, selectAll);
},
/**
* If the funnel id is specified it is returned. If no funnel id
* specified, all funnels are returned.
@ -178,6 +180,7 @@ nf.Funnel = (function () {
return funnelMap.get(id);
}
},
/**
* If the funnel id is specified it is refresh according to the current
* state. If not funnel id is specified, all funnels are refreshed.
@ -191,6 +194,7 @@ nf.Funnel = (function () {
d3.selectAll('g.funnel').call(updateFunnels);
}
},
/**
* Reloads the funnel state from the server and refreshes the UI.
* If the funnel is currently unknown, this function just returns.
@ -208,6 +212,7 @@ nf.Funnel = (function () {
});
}
},
/**
* Positions the component.
*
@ -216,6 +221,7 @@ nf.Funnel = (function () {
position: function (id) {
d3.select('#id-' + id).call(nf.CanvasUtils.position);
},
/**
* Sets the specified funnel(s). If the is an array, it
* will set each funnel. If it is not an array, it will
@ -244,6 +250,7 @@ nf.Funnel = (function () {
set(funnels);
}
},
/**
* Removes the specified funnel.
*
@ -261,6 +268,7 @@ nf.Funnel = (function () {
// apply the selection and handle all removed funnels
select().exit().call(removeFunnels);
},
/**
* Removes all processors.
*/

Some files were not shown because too many files have changed in this diff Show More