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} ${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/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/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/qtip2/jquery.qtip.min.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/ui-smoothness/jquery-ui-1.10.4.min.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.center.js"></script>
<script type="text/javascript" src="js/jquery/combo/jquery.combo.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/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.ellipsis.js"></script>
<script type="text/javascript" src="js/jquery/jquery.each.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/qtip2/jquery.qtip.min.js"></script>
<script type="text/javascript" src="js/nf/nf-namespace.js?${project.version}"></script> <script type="text/javascript" src="js/nf/nf-namespace.js?${project.version}"></script>
${nf.bulletin.board.script.tags} ${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/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/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/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/qtip2/jquery.qtip.min.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/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/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.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.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/lib/codemirror-compressed.js"></script>
<script type="text/javascript" src="js/codemirror/addon/edit/matchbrackets.js"></script> <script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/codemirror/addon/hint/show-hint.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-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.center.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.count.js"></script>
<script type="text/javascript" src="js/jquery/jquery.ellipsis.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/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/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/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.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.cellselectionmodel.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.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} ${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/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/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/qtip2/jquery.qtip.min.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/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.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.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.center.js"></script>
<script type="text/javascript" src="js/jquery/combo/jquery.combo.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/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.ellipsis.js"></script>
<script type="text/javascript" src="js/jquery/jquery.each.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/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.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.cellselectionmodel.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.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} ${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/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/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/qtip2/jquery.qtip.min.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/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.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.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.center.js"></script>
<script type="text/javascript" src="js/jquery/combo/jquery.combo.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/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.ellipsis.js"></script>
<script type="text/javascript" src="js/jquery/jquery.each.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/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.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.cellselectionmodel.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.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} ${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/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/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/qtip2/jquery.qtip.min.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/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.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.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.center.js"></script>
<script type="text/javascript" src="js/jquery/modal/jquery.modal.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/combo/jquery.combo.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.ellipsis.js"></script>
<script type="text/javascript" src="js/jquery/jquery.each.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/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.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.cellselectionmodel.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.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/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/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/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/qtip2/jquery.qtip.min.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/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.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.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.center.js"></script>
<script type="text/javascript" src="js/jquery/modal/jquery.modal.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/tabbs/jquery.tabbs.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/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.ellipsis.js"></script>
<script type="text/javascript" src="js/jquery/jquery.each.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/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.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.cellselectionmodel.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.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/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/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/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/qtip2/jquery.qtip.min.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/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.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.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-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/jquery.center.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/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/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.ellipsis.js"></script>
<script type="text/javascript" src="js/jquery/jquery.each.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/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.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.cellselectionmodel.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.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} ${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/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/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/qtip2/jquery.qtip.min.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/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.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.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.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/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/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.ellipsis.js"></script>
<script type="text/javascript" src="js/jquery/jquery.each.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/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.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.cellselectionmodel.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.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/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/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/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/qtip2/jquery.qtip.min.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/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.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.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.center.js"></script>
<script type="text/javascript" src="js/jquery/tabbs/jquery.tabbs.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/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/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.ellipsis.js"></script>
<script type="text/javascript" src="js/jquery/jquery.each.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/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.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.cellselectionmodel.js"></script>
<script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.js"></script> <script type="text/javascript" src="js/jquery/slickgrid/plugins/slick.rowselectionmodel.js"></script>

View File

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

View File

@ -78,4 +78,5 @@
</div> </div>
</div> </div>
</div> </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 id="cluster-search-example">(e.g.&nbsp;my.host:80)</div>
</div> </div>
</div> </div>
<div id="search-cluster-results"></div>

View File

@ -451,34 +451,41 @@ input.search-flow {
color: #7098AD; 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; font-weight: bold;
padding-top: 4px; padding-top: 4px;
padding-left: 4px; padding-left: 4px;
padding-right: 4px; padding-right: 4px;
height: 14px; height: 14px;
float: left;
clear: left;
} }
.ui-autocomplete { #search-flow-results div.search-match-header {
max-height: 400px;
overflow: auto;
}
div.search-match-header {
font-weight: normal; font-weight: normal;
margin-left: 19px; margin-left: 19px;
} }
div.search-match { #search-flow-results div.search-match {
margin-left: 26px; margin-left: 26px;
color: #888; color: #888;
font-size: 10px; font-size: 10px;
line-height: 1.4em; line-height: 1.4em;
} }
li.search-no-matches { #search-flow-results li.search-no-matches {
padding: 4px; padding: 4px;
font-weight: bold; font-weight: bold;
color: #aaa; color: #aaa;

View File

@ -110,14 +110,26 @@ input.search-users {
color: #888; 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 { li.search-users-header {
font-weight: bold; font-weight: bold;
padding-top: 4px; padding-top: 4px;
padding-left: 4px; padding-left: 4px;
padding-right: 4px; padding-right: 4px;
height: 14px; height: 14px;
float: left;
clear: left;
} }
div.search-users-match-header { div.search-users-match-header {

View File

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

View File

@ -139,9 +139,18 @@ div.search-match {
font-size: 10px; font-size: 10px;
} }
.ui-autocomplete { #search-cluster-results .ui-autocomplete {
max-height: 300px; max-height: 300px;
overflow: auto; 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 { input.search-nodes {

View File

@ -1,19 +1,19 @@
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 Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software. all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 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 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.

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 { .CodeMirror-hints {
position: absolute; position: absolute;
z-index: 10; z-index: 10;
overflow: hidden; overflow: hidden;
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 2px; padding: 2px;
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
-moz-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); box-shadow: 2px 3px 5px rgba(0,0,0,.2);
border-radius: 3px; border-radius: 3px;
border: 1px solid silver; border: 1px solid silver;
background: white; background: white;
font-size: 90%; font-size: 90%;
font-family: monospace; font-family: monospace;
max-height: 20em; max-height: 20em;
overflow-y: auto; overflow-y: auto;
} }
.CodeMirror-hint { .CodeMirror-hint {
margin: 0; margin: 0;
padding: 0 4px; padding: 0 4px;
border-radius: 2px; border-radius: 2px;
max-width: 19em; max-width: 19em;
overflow: hidden; overflow: hidden;
white-space: pre; white-space: pre;
color: black; color: black;
cursor: pointer; cursor: pointer;
} }
.CodeMirror-hint-active { li.CodeMirror-hint-active {
background: #08f; background: #08f;
color: white; 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 */ /* BASICS */
.CodeMirror { .CodeMirror {
/* Set height, width, borders, and global font properties here */ /* Set height, width, borders, and global font properties here */
font-family: monospace; font-family: monospace;
height: 300px; height: 300px;
} }
.CodeMirror-scroll { .CodeMirror-scroll {
/* Set scrolling behaviour here */ /* Set scrolling behaviour here */
overflow: auto; overflow: auto;
} }
/* PADDING */ /* PADDING */
.CodeMirror-lines { .CodeMirror-lines {
padding: 4px 0; /* Vertical padding around content */ padding: 4px 0; /* Vertical padding around content */
} }
.CodeMirror pre { .CodeMirror pre {
padding: 0 4px; /* Horizontal padding of content */ padding: 0 4px; /* Horizontal padding of content */
} }
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { .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 */ /* GUTTER */
.CodeMirror-gutters { .CodeMirror-gutters {
border-right: 1px solid #ddd; border-right: 1px solid #ddd;
background-color: #f7f7f7; background-color: #f7f7f7;
white-space: nowrap; white-space: nowrap;
} }
.CodeMirror-linenumbers {} .CodeMirror-linenumbers {}
.CodeMirror-linenumber { .CodeMirror-linenumber {
padding: 0 3px 0 5px; padding: 0 3px 0 5px;
min-width: 20px; min-width: 20px;
text-align: right; text-align: right;
color: #999; color: #999;
-moz-box-sizing: content-box; -moz-box-sizing: content-box;
box-sizing: content-box; box-sizing: content-box;
} }
.CodeMirror-guttermarker { color: black; }
.CodeMirror-guttermarker-subtle { color: #999; }
/* CURSOR */ /* CURSOR */
.CodeMirror div.CodeMirror-cursor { .CodeMirror div.CodeMirror-cursor {
border-left: 1px solid black; border-left: 1px solid black;
} }
/* Shown when moving in bi-directional text */ /* Shown when moving in bi-directional text */
.CodeMirror div.CodeMirror-secondarycursor { .CodeMirror div.CodeMirror-secondarycursor {
border-left: 1px solid silver; border-left: 1px solid silver;
} }
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor { .CodeMirror.cm-fat-cursor div.CodeMirror-cursor {
width: auto; width: auto;
border: 0; border: 0;
background: #7e7; 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 */ /* Can style cursor different in overwrite (non-insert) mode */
div.CodeMirror-overwrite div.CodeMirror-cursor {} div.CodeMirror-overwrite div.CodeMirror-cursor {}
.cm-tab { display: inline-block; } .cm-tab { display: inline-block; text-decoration: inherit; }
.CodeMirror-ruler { .CodeMirror-ruler {
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
position: absolute; position: absolute;
} }
/* DEFAULT THEME */ /* DEFAULT THEME */
@ -70,11 +100,12 @@ div.CodeMirror-overwrite div.CodeMirror-cursor {}
.cm-s-default .cm-atom {color: #219;} .cm-s-default .cm-atom {color: #219;}
.cm-s-default .cm-number {color: #164;} .cm-s-default .cm-number {color: #164;}
.cm-s-default .cm-def {color: #00f;} .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-2 {color: #05a;}
.cm-s-default .cm-variable-3 {color: #085;} .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-comment {color: #a50;}
.cm-s-default .cm-string {color: #a11;} .cm-s-default .cm-string {color: #a11;}
.cm-s-default .cm-string-2 {color: #f50;} .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-header, .cm-strong {font-weight: bold;}
.cm-em {font-style: italic;} .cm-em {font-style: italic;}
.cm-link {text-decoration: underline;} .cm-link {text-decoration: underline;}
.cm-strikethrough {text-decoration: line-through;}
.cm-s-default .cm-error {color: #f00;} .cm-s-default .cm-error {color: #f00;}
.cm-invalidchar {color: #f00;} .cm-invalidchar {color: #f00;}
/* Default styles for common addons */
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
.CodeMirror-activeline-background {background: #e8f2ff;} .CodeMirror-activeline-background {background: #e8f2ff;}
/* STOP */ /* STOP */
@ -108,152 +143,159 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
the editor. You probably shouldn't touch them. */ the editor. You probably shouldn't touch them. */
.CodeMirror { .CodeMirror {
line-height: 1; line-height: 1;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
background: white; background: white;
color: black; color: black;
} }
.CodeMirror-scroll { .CodeMirror-scroll {
/* 30px is the magic margin used to hide the element's real scrollbars */ /* 30px is the magic margin used to hide the element's real scrollbars */
/* See overflow: hidden in .CodeMirror */ /* See overflow: hidden in .CodeMirror */
margin-bottom: -30px; margin-right: -30px; margin-bottom: -30px; margin-right: -30px;
padding-bottom: 30px; padding-bottom: 30px;
height: 100%; height: 100%;
outline: none; /* Prevent dragging from highlighting the element */ outline: none; /* Prevent dragging from highlighting the element */
position: relative; position: relative;
-moz-box-sizing: content-box; -moz-box-sizing: content-box;
box-sizing: content-box; box-sizing: content-box;
} }
.CodeMirror-sizer { .CodeMirror-sizer {
position: relative; position: relative;
border-right: 30px solid transparent; border-right: 30px solid transparent;
-moz-box-sizing: content-box; -moz-box-sizing: content-box;
box-sizing: content-box; box-sizing: content-box;
} }
/* The fake, visible scrollbars. Used to force redraw during scrolling /* The fake, visible scrollbars. Used to force redraw during scrolling
before actuall scrolling happens, thus preventing shaking and before actuall scrolling happens, thus preventing shaking and
flickering artifacts. */ flickering artifacts. */
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
position: absolute; position: absolute;
z-index: 6; z-index: 6;
display: none; display: none;
} }
.CodeMirror-vscrollbar { .CodeMirror-vscrollbar {
right: 0; top: 0; right: 0; top: 0;
overflow-x: hidden; overflow-x: hidden;
overflow-y: scroll; overflow-y: scroll;
} }
.CodeMirror-hscrollbar { .CodeMirror-hscrollbar {
bottom: 0; left: 0; bottom: 0; left: 0;
overflow-y: hidden; overflow-y: hidden;
overflow-x: scroll; overflow-x: scroll;
} }
.CodeMirror-scrollbar-filler { .CodeMirror-scrollbar-filler {
right: 0; bottom: 0; right: 0; bottom: 0;
} }
.CodeMirror-gutter-filler { .CodeMirror-gutter-filler {
left: 0; bottom: 0; left: 0; bottom: 0;
} }
.CodeMirror-gutters { .CodeMirror-gutters {
position: absolute; left: 0; top: 0; position: absolute; left: 0; top: 0;
padding-bottom: 30px; padding-bottom: 30px;
z-index: 3; z-index: 3;
} }
.CodeMirror-gutter { .CodeMirror-gutter {
white-space: normal; white-space: normal;
height: 100%; height: 100%;
-moz-box-sizing: content-box; -moz-box-sizing: content-box;
box-sizing: content-box; box-sizing: content-box;
padding-bottom: 30px; padding-bottom: 30px;
margin-bottom: -32px; margin-bottom: -32px;
display: inline-block; display: inline-block;
/* Hack to make IE7 behave */ /* Hack to make IE7 behave */
*zoom:1; *zoom:1;
*display:inline; *display:inline;
}
.CodeMirror-gutter-wrapper {
position: absolute;
z-index: 4;
height: 100%;
} }
.CodeMirror-gutter-elt { .CodeMirror-gutter-elt {
position: absolute; position: absolute;
cursor: default; cursor: default;
z-index: 4; z-index: 4;
} }
.CodeMirror-lines { .CodeMirror-lines {
cursor: text; cursor: text;
min-height: 1px; /* prevents collapsing before first draw */
} }
.CodeMirror pre { .CodeMirror pre {
/* Reset some styles that the rest of the page might have set */ /* Reset some styles that the rest of the page might have set */
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
border-width: 0; border-width: 0;
background: transparent; background: transparent;
font-family: inherit; font-family: inherit;
font-size: inherit; font-size: inherit;
margin: 0; margin: 0;
white-space: pre; white-space: pre;
word-wrap: normal; word-wrap: normal;
line-height: inherit; line-height: inherit;
color: inherit; color: inherit;
z-index: 2; z-index: 2;
position: relative; position: relative;
overflow: visible; overflow: visible;
} }
.CodeMirror-wrap pre { .CodeMirror-wrap pre {
word-wrap: break-word; word-wrap: break-word;
white-space: pre-wrap; white-space: pre-wrap;
word-break: normal; word-break: normal;
} }
.CodeMirror-linebackground { .CodeMirror-linebackground {
position: absolute; position: absolute;
left: 0; right: 0; top: 0; bottom: 0; left: 0; right: 0; top: 0; bottom: 0;
z-index: 0; z-index: 0;
} }
.CodeMirror-linewidget { .CodeMirror-linewidget {
position: relative; position: relative;
z-index: 2; z-index: 2;
overflow: auto; overflow: auto;
} }
.CodeMirror-widget {} .CodeMirror-widget {}
.CodeMirror-wrap .CodeMirror-scroll { .CodeMirror-wrap .CodeMirror-scroll {
overflow-x: hidden; overflow-x: hidden;
} }
.CodeMirror-measure { .CodeMirror-measure {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 0; height: 0;
overflow: hidden; overflow: hidden;
visibility: hidden; visibility: hidden;
} }
.CodeMirror-measure pre { position: static; } .CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { .CodeMirror div.CodeMirror-cursor {
position: absolute; position: absolute;
border-right: none; border-right: none;
width: 0; width: 0;
} }
div.CodeMirror-cursors { div.CodeMirror-cursors {
visibility: hidden; visibility: hidden;
position: relative; position: relative;
z-index: 1; z-index: 3;
} }
.CodeMirror-focused div.CodeMirror-cursors { .CodeMirror-focused div.CodeMirror-cursors {
visibility: visible; visibility: visible;
} }
.CodeMirror-selected { background: #d9d9d9; } .CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
.CodeMirror-crosshair { cursor: crosshair; }
.cm-searching { .cm-searching {
background: #ffa; background: #ffa;
background: rgba(255, 255, 0, .4); background: rgba(255, 255, 0, .4);
} }
/* IE7 hack to prevent it from returning funny offsetTops on the spans */ /* 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; } .cm-force-border { padding-right: .1px; }
@media print { @media print {
/* Hide the cursor when printing */ /* Hide the cursor when printing */
.CodeMirror div.CodeMirror-cursors { .CodeMirror div.CodeMirror-cursors {
visibility: hidden; 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,26 +1,26 @@
Copyright (c) 2013, Michael Bostock Copyright (c) 2010-2014, Michael Bostock
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this * Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer. list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution. and/or other materials provided with the distribution.
* The name Michael Bostock may not be used to endorse or promote products * The name Michael Bostock may not be used to endorse or promote products
derived from this software without specific prior written permission. derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

File diff suppressed because one or more lines are too long

View File

@ -93,7 +93,7 @@
// ensure we found the selected option // ensure we found the selected option
if (isDefinedAndNotNull(selectedOption)) { 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 the selected option is disabled show it
if (selectedOption.disabled === true) { if (selectedOption.disabled === true) {
@ -245,9 +245,6 @@
// add the drop down arrow // add the drop down arrow
$('<div class="combo-arrow"></div>').appendTo(combo); $('<div class="combo-arrow"></div>').appendTo(combo);
// set the width of the combo text
comboText.width($(combo).outerWidth() - 25);
// set the selection // set the selection
if (isDefinedAndNotNull(options.selectedOption)) { if (isDefinedAndNotNull(options.selectedOption)) {
selectOption(combo, options.selectedOption.text, options.selectedOption.value); 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 { .minicolors {
position: relative; position: relative;
} }
.minicolors-swatch { .minicolors-swatch {
position: absolute; position: absolute;
vertical-align: middle; vertical-align: middle;
background: url(jquery.minicolors.png) -80px 0; background: url(jquery.minicolors.png) -80px 0;
border: solid 1px #ccc; border: solid 1px #ccc;
cursor: text; cursor: text;
padding: 0; padding: 0;
margin: 0; margin: 0;
display: inline-block; display: inline-block;
} }
.minicolors-swatch-color { .minicolors-swatch-color {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
} }
.minicolors input[type=hidden] + .minicolors-swatch { .minicolors input[type=hidden] + .minicolors-swatch {
width: 28px; width: 28px;
position: static; position: static;
cursor: pointer; cursor: pointer;
} }
/* Panel */ /* Panel */
.minicolors-panel { .minicolors-panel {
position: absolute; position: absolute;
width: 173px; width: 173px;
height: 152px; height: 152px;
background: white; background: white;
border: solid 1px #CCC; border: solid 1px #CCC;
box-shadow: 0 0 20px rgba(0, 0, 0, .2); box-shadow: 0 0 20px rgba(0, 0, 0, .2);
z-index: 99999; z-index: 99999;
-moz-box-sizing: content-box; -moz-box-sizing: content-box;
-webkit-box-sizing: content-box; -webkit-box-sizing: content-box;
box-sizing: content-box; box-sizing: content-box;
display: none; display: none;
} }
.minicolors-panel.minicolors-visible { .minicolors-panel.minicolors-visible {
display: block; display: block;
} }
/* Panel positioning */ /* Panel positioning */
.minicolors-position-top .minicolors-panel { .minicolors-position-top .minicolors-panel {
top: -154px; top: -154px;
} }
.minicolors-position-right .minicolors-panel { .minicolors-position-right .minicolors-panel {
right: 0; right: 0;
} }
.minicolors-position-bottom .minicolors-panel { .minicolors-position-bottom .minicolors-panel {
top: auto; top: auto;
} }
.minicolors-position-left .minicolors-panel { .minicolors-position-left .minicolors-panel {
left: 0; left: 0;
} }
.minicolors-with-opacity .minicolors-panel { .minicolors-with-opacity .minicolors-panel {
width: 194px; width: 194px;
} }
.minicolors .minicolors-grid { .minicolors .minicolors-grid {
position: absolute; position: absolute;
top: 1px; top: 1px;
left: 1px; left: 1px;
width: 150px; width: 150px;
height: 150px; height: 150px;
background: url(jquery.minicolors.png) -120px 0; background: url(jquery.minicolors.png) -120px 0;
cursor: crosshair; cursor: crosshair;
} }
.minicolors .minicolors-grid-inner { .minicolors .minicolors-grid-inner {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 150px; width: 150px;
height: 150px; height: 150px;
background: none; background: none;
} }
.minicolors-slider-saturation .minicolors-grid { .minicolors-slider-saturation .minicolors-grid {
background-position: -420px 0; background-position: -420px 0;
} }
.minicolors-slider-saturation .minicolors-grid-inner { .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 { .minicolors-slider-brightness .minicolors-grid {
background-position: -570px 0; background-position: -570px 0;
} }
.minicolors-slider-brightness .minicolors-grid-inner { .minicolors-slider-brightness .minicolors-grid-inner {
background: black; background: black;
} }
.minicolors-slider-wheel .minicolors-grid { .minicolors-slider-wheel .minicolors-grid {
background-position: -720px 0; background-position: -720px 0;
} }
.minicolors-slider, .minicolors-slider,
.minicolors-opacity-slider { .minicolors-opacity-slider {
position: absolute; position: absolute;
top: 1px; top: 1px;
left: 152px; left: 152px;
width: 20px; width: 20px;
height: 150px; height: 150px;
background: white url(jquery.minicolors.png) 0 0; background: white url(jquery.minicolors.png) 0 0;
cursor: row-resize; cursor: row-resize;
} }
.minicolors-slider-saturation .minicolors-slider { .minicolors-slider-saturation .minicolors-slider {
background-position: -60px 0; background-position: -60px 0;
} }
.minicolors-slider-brightness .minicolors-slider { .minicolors-slider-brightness .minicolors-slider {
background-position: -20px 0; background-position: -20px 0;
} }
.minicolors-slider-wheel .minicolors-slider { .minicolors-slider-wheel .minicolors-slider {
background-position: -20px 0; background-position: -20px 0;
} }
.minicolors-opacity-slider { .minicolors-opacity-slider {
left: 173px; left: 173px;
background-position: -40px 0; background-position: -40px 0;
display: none; display: none;
} }
.minicolors-with-opacity .minicolors-opacity-slider { .minicolors-with-opacity .minicolors-opacity-slider {
display: block; display: block;
} }
/* Pickers */ /* Pickers */
.minicolors-grid .minicolors-picker { .minicolors-grid .minicolors-picker {
position: absolute; position: absolute;
top: 70px; top: 70px;
left: 70px; left: 70px;
width: 12px; width: 12px;
height: 12px; height: 12px;
border: solid 1px black; border: solid 1px black;
border-radius: 10px; border-radius: 10px;
margin-top: -6px; margin-top: -6px;
margin-left: -6px; margin-left: -6px;
background: none; background: none;
} }
.minicolors-grid .minicolors-picker > div { .minicolors-grid .minicolors-picker > div {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 8px; width: 8px;
height: 8px; height: 8px;
border-radius: 8px; border-radius: 8px;
border: solid 2px white; border: solid 2px white;
-moz-box-sizing: content-box; -moz-box-sizing: content-box;
-webkit-box-sizing: content-box; -webkit-box-sizing: content-box;
box-sizing: content-box; box-sizing: content-box;
} }
.minicolors-picker { .minicolors-picker {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 18px; width: 18px;
height: 2px; height: 2px;
background: white; background: white;
border: solid 1px black; border: solid 1px black;
margin-top: -2px; margin-top: -2px;
-moz-box-sizing: content-box; -moz-box-sizing: content-box;
-webkit-box-sizing: content-box; -webkit-box-sizing: content-box;
box-sizing: content-box; box-sizing: content-box;
} }
/* Inline controls */ /* Inline controls */
.minicolors-inline { .minicolors-inline {
display: inline-block; display: inline-block;
} }
.minicolors-inline .minicolors-input { .minicolors-inline .minicolors-input {
display: none !important; display: none !important;
} }
.minicolors-inline .minicolors-panel { .minicolors-inline .minicolors-panel {
position: relative; position: relative;
top: auto; top: auto;
left: auto; left: auto;
box-shadow: none; box-shadow: none;
z-index: auto; z-index: auto;
display: inline-block; display: inline-block;
} }
/* Default theme */ /* Default theme */
.minicolors-theme-default .minicolors-swatch { .minicolors-theme-default .minicolors-swatch {
top: 5px; top: 5px;
left: 5px; left: 5px;
width: 18px; width: 18px;
height: 18px; height: 18px;
} }
.minicolors-theme-default.minicolors-position-right .minicolors-swatch { .minicolors-theme-default.minicolors-position-right .minicolors-swatch {
left: auto; left: auto;
right: 5px; right: 5px;
} }
.minicolors-theme-default.minicolors { .minicolors-theme-default.minicolors {
width: auto; width: auto;
display: inline-block; display: inline-block;
} }
.minicolors-theme-default .minicolors-input { .minicolors-theme-default .minicolors-input {
height: 20px; height: 20px;
width: auto; width: auto;
display: inline-block; display: inline-block;
padding-left: 26px; padding-left: 26px;
} }
.minicolors-theme-default.minicolors-position-right .minicolors-input { .minicolors-theme-default.minicolors-position-right .minicolors-input {
padding-right: 26px; padding-right: 26px;
padding-left: inherit; padding-left: inherit;
} }
/* Bootstrap theme */ /* Bootstrap theme */
.minicolors-theme-bootstrap .minicolors-swatch { .minicolors-theme-bootstrap .minicolors-swatch {
top: 3px; top: 3px;
left: 3px; left: 3px;
width: 28px; width: 28px;
height: 28px; height: 28px;
border-radius: 3px; border-radius: 3px;
}
.minicolors-theme-bootstrap .minicolors-swatch-color {
border-radius: inherit;
} }
.minicolors-theme-bootstrap.minicolors-position-right .minicolors-swatch { .minicolors-theme-bootstrap.minicolors-position-right .minicolors-swatch {
left: auto; left: auto;
right: 3px; right: 3px;
} }
.minicolors-theme-bootstrap .minicolors-input { .minicolors-theme-bootstrap .minicolors-input {
padding-left: 44px; padding-left: 44px;
} }
.minicolors-theme-bootstrap.minicolors-position-right .minicolors-input { .minicolors-theme-bootstrap.minicolors-position-right .minicolors-input {
padding-right: 44px; padding-right: 44px;
padding-left: 12px; 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 { .slick-headerrow {
background: #fafafa; background: #fafafa;
} }
.slick-headerrow-column { .slick-headerrow-column {
background: #fafafa; background: #fafafa;
border-bottom: 0; border-bottom: 0;
height: 100%; height: 100%;
} }
.slick-row.ui-state-active { .slick-row.ui-state-active {
background: #F5F7D7; background: #F5F7D7;
} }
.slick-row { .slick-row {
position: absolute; position: absolute;
background: white; background: white;
border: 0px; border: 0px;
line-height: 20px; line-height: 20px;
} }
.slick-row:hover { .slick-row:hover {
@ -56,37 +56,37 @@ classes should alter those!
} }
.slick-row.selected { .slick-row.selected {
z-index: 10; z-index: 10;
background: #DFE8F6 !important; background: #DFE8F6 !important;
} }
.slick-cell { .slick-cell {
padding-left: 4px; padding-left: 4px;
padding-right: 4px; padding-right: 4px;
border-style: solid !important; border-style: solid !important;
} }
.slick-group { .slick-group {
border-bottom: 2px solid silver; border-bottom: 2px solid silver;
} }
.slick-group-toggle { .slick-group-toggle {
width: 9px; width: 9px;
height: 9px; height: 9px;
margin-right: 5px; margin-right: 5px;
} }
.slick-group-toggle.expanded { .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 { .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 { .slick-group-totals {
color: gray; color: gray;
background: white; background: white;
} }
.slick-cell.selected { .slick-cell.selected {
@ -100,22 +100,36 @@ classes should alter those!
} }
.slick-sortable-placeholder { .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"] { .slick-row.odd {
background: #fafafa; background: #fafafa;
} }
.slick-row.ui-state-active { .slick-row.ui-state-active {
background: #F5F7D7; background: #F5F7D7;
} }
.slick-row.loading { .slick-row.loading {
opacity: 0.5; opacity: 0.5;
filter: alpha(opacity = 50); filter: alpha(opacity = 50);
} }
.slick-cell.invalid { .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 { .slick-header.ui-state-default, .slick-headerrow.ui-state-default {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
border-left: 0px; /*border-left: 0px;*/
border: 0px;
} }
.slick-header-columns, .slick-headerrow-columns { .slick-header-columns, .slick-headerrow-columns {
width: 999999px; position: relative;
position: relative; white-space: nowrap;
white-space: nowrap; cursor: default;
cursor: default; overflow: hidden;
overflow: hidden;
} }
.slick-header-column.ui-state-default { .slick-header-column.ui-state-default {
position: relative; position: relative;
display: inline-block; display: inline-block;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; -o-text-overflow: ellipsis;
height: 16px; text-overflow: ellipsis;
line-height: 16px; height: 16px;
margin: 0; line-height: 16px;
padding: 4px; margin: 0;
border-right: 1px solid silver; padding: 4px;
border-left: 0px; border-right: 1px solid silver;
border-top: 0px; border-left: 0px;
border-bottom: 0px; border-top: 0px;
float: left; border-bottom: 0px;
float: left;
} }
.slick-headerrow-column.ui-state-default { .slick-headerrow-column.ui-state-default {
padding: 4px; padding: 4px;
} }
.slick-header-column-sorted { .slick-header-column-sorted {
font-style: italic; font-style: italic;
} }
.slick-sort-indicator { .slick-sort-indicator {
display: inline-block; display: inline-block;
width: 8px; width: 8px;
height: 5px; height: 5px;
margin-left: 4px; margin-left: 4px;
margin-top: 6px;
/*float: left;*/
} }
.slick-sort-indicator-desc { .slick-sort-indicator-desc {
background: url(images/sort-desc.gif); background: url(images/sort-desc.gif);
} }
.slick-sort-indicator-asc { .slick-sort-indicator-asc {
background: url(images/sort-asc.gif); background: url(images/sort-asc.gif);
} }
.slick-resizable-handle { .slick-resizable-handle {
position: absolute; position: absolute;
font-size: 0.1px; font-size: 0.1px;
display: block; display: block;
cursor: col-resize; cursor: col-resize;
width: 4px; width: 4px;
right: 0px; right: 0px;
top: 0; top: 0;
height: 100%; height: 100%;
} }
.slick-sortable-placeholder { .slick-sortable-placeholder {
background: silver; background: silver;
} }
.grid-canvas { .grid-canvas {
position: relative; position: relative;
outline: 0; outline: 0;
} }
.slick-row.ui-widget-content, .slick-row.ui-state-active { .slick-row.ui-widget-content, .slick-row.ui-state-active {
position: absolute; position: absolute;
border: 0px; border: 0px;
width: 100%; width: 100%;
} }
.slick-cell, .slick-headerrow-column { .slick-cell, .slick-headerrow-column {
position: absolute; position: absolute;
border: 1px solid transparent;
border: 1px solid transparent; border-right: 1px dotted silver;
border-right: 1px dotted silver; border-bottom-color: silver;
border-bottom-color: silver; overflow: hidden;
-o-text-overflow: ellipsis;
overflow: hidden; text-overflow: ellipsis;
text-overflow: ellipsis; vertical-align: middle;
white-space: nowrap; z-index: 1;
vertical-align: middle; padding: 1px 2px 2px 1px;
z-index: 1; margin: 0;
padding: 1px 2px 2px 1px; white-space: nowrap;
margin: 0; cursor: default;
white-space: nowrap;
cursor: default;
} }
.slick-group { .slick-group {
} }
.slick-group-toggle { .slick-group-toggle {
display: inline-block; display: inline-block;
} }
.slick-cell.highlighted { .slick-cell.highlighted {
background: lightskyblue; background: lightskyblue;
background: rgba(0, 0, 255, 0.2); background: rgba(0, 0, 255, 0.2);
-webkit-transition: all 0.5s; -webkit-transition: all 0.5s;
-moz-transition: all 0.5s; -moz-transition: all 0.5s;
transition: all 0.5s; -o-transition: all 0.5s;
transition: all 0.5s;
} }
.slick-cell.flashing { .slick-cell.flashing {
border: 1px solid red !important; border: 1px solid red !important;
} }
.slick-cell.editable { .slick-cell.editable {
z-index: 11; z-index: 11;
overflow: visible; overflow: visible;
background: white; background: white;
border-color: black; border-color: black;
border-style: solid; border-style: solid;
} }
.slick-cell:focus { .slick-cell:focus {
outline: none; outline: none;
} }
.slick-reorder-proxy { .slick-reorder-proxy {
display: inline-block; display: inline-block;
background: blue; background: blue;
opacity: 0.15; opacity: 0.15;
filter: alpha(opacity = 15); filter: alpha(opacity = 15);
cursor: move; cursor: move;
} }
.slick-reorder-guide { .slick-reorder-guide {
display: inline-block; display: inline-block;
height: 2px; height: 2px;
background: blue; background: blue;
opacity: 0.7; opacity: 0.7;
filter: alpha(opacity = 70); filter: alpha(opacity = 70);
} }
.slick-selection { .slick-selection {
z-index: 10; z-index: 10;
position: absolute; position: absolute;
border: 2px dashed black; border: 2px dashed black;
} }

View File

@ -1,48 +1,83 @@
(function ($) { (function ($) {
// register namespace // Register namespace
$.extend(true, window, { $.extend(true, window, {
"Slick": { "Slick": {
"AutoTooltips": AutoTooltips "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
});
} }
});
/**
* 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); })(jQuery);

View File

@ -1,64 +1,66 @@
(function ($) { (function ($) {
// register namespace // register namespace
$.extend(true, window, { $.extend(true, window, {
"Slick": { "Slick": {
"CellRangeDecorator": CellRangeDecorator "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
});
} }
})(jQuery); });
/***
* 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 ($) { (function ($) {
// register namespace // register namespace
$.extend(true, window, { $.extend(true, window, {
"Slick": { "Slick": {
"CellRangeSelector": CellRangeSelector "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()
});
} }
});
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); })(jQuery);

View File

@ -1,90 +1,154 @@
(function ($) { (function ($) {
// register namespace // register namespace
$.extend(true, window, { $.extend(true, window, {
"Slick": { "Slick": {
"CellSelectionModel": CellSelectionModel "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()
});
} }
})(jQuery); });
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 ($) { (function ($) {
// register namespace // register namespace
$.extend(true, window, { $.extend(true, window, {
"Slick": { "Slick": {
"RowSelectionModel": RowSelectionModel "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()
});
} }
});
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); })(jQuery);

View File

@ -5,419 +5,463 @@
*/ */
(function ($) { (function ($) {
// register namespace // register namespace
$.extend(true, window, { $.extend(true, window, {
"Slick": { "Slick": {
"Event": Event, "Event": Event,
"EventData": EventData, "EventData": EventData,
"EventHandler": EventHandler, "EventHandler": EventHandler,
"Range": Range, "Range": Range,
"NonDataRow": NonDataItem, "NonDataRow": NonDataItem,
"Group": Group, "Group": Group,
"GroupTotals": GroupTotals, "GroupTotals": GroupTotals,
"EditorLock": EditorLock, "EditorLock": EditorLock,
/***
* A global singleton editor lock. /***
* @class GlobalEditorLock * A global singleton editor lock.
* @static * @class GlobalEditorLock
* @constructor * @static
*/ * @constructor
"GlobalEditorLock": new EditorLock() */
} "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. * Stops event from propagating up the DOM tree.
* <p>This is pretty much identical to how W3C and jQuery implement events.</p> * @method stopPropagation
* @class EventData
* @constructor
*/ */
function EventData() { this.stopPropagation = function () {
var isPropagationStopped = false; isPropagationStopped = true;
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;
}; };
/*** /***
* Information about group totals. * Returns whether stopPropagation was called on this event object.
* An instance of GroupTotals will be created for each totals row and passed to the aggregators * @method isPropagationStopped
* so that they can store arbitrary data in it. That data can later be accessed by group totals * @return {Boolean}
* formatters during the display.
* @class GroupTotals
* @extends Slick.NonDataItem
* @constructor
*/ */
function GroupTotals() { this.isPropagationStopped = function () {
this.__groupTotals = true; return isPropagationStopped;
};
/***
* Parent Group.
* @param group
* @type {Group}
*/
this.group = null;
}
GroupTotals.prototype = new NonDataItem();
/*** /***
* A locking helper to track the active edit controller and ensure that only a single controller * Prevents the rest of the handlers from being executed.
* can be active at a time. This prevents a whole class of state and validation synchronization * @method stopImmediatePropagation
* 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() { this.stopImmediatePropagation = function () {
var activeEditController = null; isImmediatePropagationStopped = true;
};
/*** /***
* Returns true if a specified edit controller is active (has the edit lock). * Returns whether stopImmediatePropagation was called on this event object.\
* If the parameter is not specified, returns true if any edit controller is active. * @method isImmediatePropagationStopped
* @method isActive * @return {Boolean}
* @param editController {EditController} */
* @return {Boolean} this.isImmediatePropagationStopped = function () {
*/ return isImmediatePropagationStopped;
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);
};
} }
}
/***
* 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); })(jQuery);

View File

@ -1,55 +1,59 @@
/*** /***
* Contains basic SlickGrid formatters. * 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 * @module Formatters
* @namespace Slick * @namespace Slick
*/ */
(function ($) { (function ($) {
// register namespace // register namespace
$.extend(true, window, { $.extend(true, window, {
"Slick": { "Slick": {
"Formatters": { "Formatters": {
"PercentComplete": PercentCompleteFormatter, "PercentComplete": PercentCompleteFormatter,
"PercentCompleteBar": PercentCompleteBarFormatter, "PercentCompleteBar": PercentCompleteBarFormatter,
"YesNo": YesNoFormatter, "YesNo": YesNoFormatter,
"Checkmark": CheckmarkFormatter "Checkmark": CheckmarkFormatter
} }
} }
}); });
function PercentCompleteFormatter(row, cell, value, columnDef, dataContext) { function PercentCompleteFormatter(row, cell, value, columnDef, dataContext) {
if (value == null || value === "") { if (value == null || value === "") {
return "-"; return "-";
} else if (value < 50) { } else if (value < 50) {
return "<span style='color:red;font-weight:bold;'>" + value + "%</span>"; return "<span style='color:red;font-weight:bold;'>" + value + "%</span>";
} else { } else {
return "<span style='color:green'>" + value + "%</span>"; 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) { var color;
if (value == null || value === "") {
return "";
}
var color; if (value < 30) {
color = "red";
if (value < 30) { } else if (value < 70) {
color = "red"; color = "silver";
} else if (value < 70) { } else {
color = "silver"; color = "green";
} else {
color = "green";
}
return "<span class='percent-complete-bar' style='background:" + color + ";width:" + value + "%'></span>";
} }
function YesNoFormatter(row, cell, value, columnDef, dataContext) { return "<span class='percent-complete-bar' style='background:" + color + ";width:" + value + "%'></span>";
return value ? "Yes" : "No"; }
}
function CheckmarkFormatter(row, cell, value, columnDef, dataContext) { function YesNoFormatter(row, cell, value, columnDef, dataContext) {
return value ? "<img src='../images/tick.png'>" : ""; return value ? "Yes" : "No";
} }
})(jQuery);
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', type: 'GET',
url: config.urls.controllerAbout, url: config.urls.controllerAbout,
dataType: 'json' dataType: 'json'
}).then(function (response) { }).done(function (response) {
var aboutDetails = response.about; var aboutDetails = response.about;
var bulletinBoardTitle = aboutDetails.title + ' Bulletin Board'; var bulletinBoardTitle = aboutDetails.title + ' Bulletin Board';
// set the document title and the about title // set the document title and the about title
document.title = bulletinBoardTitle; document.title = bulletinBoardTitle;
$('#bulletin-board-header-text').text(bulletinBoardTitle); $('#bulletin-board-header-text').text(bulletinBoardTitle);
}, nf.Common.handleAjaxError); }).fail(nf.Common.handleAjaxError);
// get the banners if we're not in the shell // get the banners if we're not in the shell
var loadBanners = $.Deferred(function (deferred) { var loadBanners = $.Deferred(function (deferred) {
@ -128,7 +128,7 @@ nf.BulletinBoard = (function () {
type: 'GET', type: 'GET',
url: config.urls.banners, url: config.urls.banners,
dataType: 'json' dataType: 'json'
}).then(function (response) { }).done(function (response) {
// ensure the banners response is specified // ensure the banners response is specified
if (nf.Common.isDefinedAndNotNull(response.banners)) { if (nf.Common.isDefinedAndNotNull(response.banners)) {
if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') { if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
@ -160,7 +160,7 @@ nf.BulletinBoard = (function () {
} }
deferred.resolve(); deferred.resolve();
}, function (xhr, status, error) { }).fail(function (xhr, status, error) {
nf.Common.handleAjaxError(xhr, status, error); nf.Common.handleAjaxError(xhr, status, error);
deferred.reject(); deferred.reject();
}); });
@ -170,9 +170,9 @@ nf.BulletinBoard = (function () {
}); });
return $.Deferred(function (deferred) { return $.Deferred(function (deferred) {
$.when(getTitle, loadBanners).then(function () { $.when(getTitle, loadBanners).done(function () {
deferred.resolve(); deferred.resolve();
}, function () { }).fail(function () {
deferred.reject(); deferred.reject();
}); });
}).promise(); }).promise();
@ -294,7 +294,7 @@ nf.BulletinBoard = (function () {
url: config.urls.bulletinBoard, url: config.urls.bulletinBoard,
data: data, data: data,
dataType: 'json' dataType: 'json'
}).then(function (response) { }).done(function (response) {
// ensure the bulletin board was specified // ensure the bulletin board was specified
if (nf.Common.isDefinedAndNotNull(response.bulletinBoard)) { if (nf.Common.isDefinedAndNotNull(response.bulletinBoard)) {
var bulletinBoard = response.bulletinBoard; var bulletinBoard = response.bulletinBoard;
@ -369,7 +369,7 @@ nf.BulletinBoard = (function () {
bulletinContainer.prepend('<div class="bulletin-action">&#8230;</div>'); bulletinContainer.prepend('<div class="bulletin-action">&#8230;</div>');
} }
} }
}, function (xhr, status, error) { }).fail(function (xhr, status, error) {
// likely caused by a invalid regex // likely caused by a invalid regex
if (xhr.status === 404) { if (xhr.status === 404) {
$('#bulletin-error-message').text(xhr.responseText).show(); $('#bulletin-error-message').text(xhr.responseText).show();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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