diff --git a/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/WEB-INF/jsp/index.jsp b/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/WEB-INF/jsp/index.jsp
index 8470f61393..e39ccc3bf0 100644
--- a/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/WEB-INF/jsp/index.jsp
+++ b/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/WEB-INF/jsp/index.jsp
@@ -23,7 +23,7 @@
-
+
@@ -33,8 +33,8 @@
-
-
+
+
diff --git a/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/css/ellipsis-xbl.xml b/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/css/ellipsis-xbl.xml
deleted file mode 100644
index ea0bdf8a00..0000000000
--- a/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/css/ellipsis-xbl.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/css/ui.jqgrid.css b/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/css/ui.jqgrid.css
old mode 100755
new mode 100644
index a3baeeda4b..11594b11f5
--- a/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/css/ui.jqgrid.css
+++ b/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/css/ui.jqgrid.css
@@ -1,181 +1,120 @@
/*Grid*/
-.ui-jqgrid {position: relative; font-size:11px;}
-.ui-jqgrid .ui-jqgrid-view {position: relative;left:0px; top: 0px; padding: .0em;}
-
+.ui-jqgrid {position: relative;}
+.ui-jqgrid .ui-jqgrid-view {position: relative;left:0; top: 0; padding: 0; font-size:11px;}
/* caption*/
-.ui-jqgrid .ui-jqgrid-titlebar {padding: .3em .2em .2em .3em; position: relative; border-left: 0px none;border-right: 0px none; border-top: 0px none;}
-.ui-jqgrid .ui-jqgrid-title { float: left; margin: .1em 0 .2em; }
-.ui-jqgrid .ui-jqgrid-titlebar-close { position: absolute;top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height:18px;}.ui-jqgrid .ui-jqgrid-titlebar-close span { display: block; margin: 1px; }
+.ui-jqgrid .ui-jqgrid-titlebar {padding: .3em .2em .2em .3em; position: relative; font-size: 12px; border-left: 0 none;border-right: 0 none; border-top: 0 none;}
+.ui-jqgrid .ui-jqgrid-caption {text-align: left;}
+.ui-jqgrid .ui-jqgrid-title { margin: .1em 0 .2em; }
+.ui-jqgrid .ui-jqgrid-titlebar-close { position: absolute;top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height:18px; cursor:pointer;}
+.ui-jqgrid .ui-jqgrid-titlebar-close span { display: block; margin: 1px; }
.ui-jqgrid .ui-jqgrid-titlebar-close:hover { padding: 0; }
-
/* header*/
-/*.ui-jqgrid .ui-jqgrid-hdiv {position: relative; margin: 0em;padding: 0em; overflow-x: hidden; overflow-y: auto; border-left: 0px none !important; border-top : 0px none !important; border-right : 0px none !important;}*/
-.ui-jqgrid .ui-jqgrid-hdiv {
- position: relative;
- margin: 0em;
- padding: 0em;
- overflow-x: hidden;
- overflow-y: auto;
- border-left: 0px none !important;
- border-top : 0px none !important;
- border-right : 0px none !important;
- border-bottom: 1px solid #666;
- background-image: url(../../../../images/bgTableHeader.png);
- background-repeat: repeat-x;
-}
-
+.ui-jqgrid .ui-jqgrid-hdiv {position: relative; margin: 0;padding: 0; overflow-x: hidden; border-left: 0 none !important; border-top : 0 none !important; border-right : 0 none !important;}
.ui-jqgrid .ui-jqgrid-hbox {float: left; padding-right: 20px;}
-.ui-jqgrid .ui-jqgrid-htable {table-layout:fixed;margin:0em;}
-/*.ui-jqgrid .ui-jqgrid-htable th {height:22px;padding: 0 2px 0 2px;}*/
-.ui-jqgrid .ui-jqgrid-htable th {
- height: 26px;
- padding: 0 2px;
- border-right: 1px solid #172B31;
- border-bottom: 1px solid #365C6A;
- background-image: url(../../../../images/bgTableHeader.png);
- background-repeat: repeat-x;
-}
-/*.ui-jqgrid .ui-jqgrid-htable th div {overflow: hidden; position:relative; height:17px;}*/
-.ui-jqgrid .ui-jqgrid-htable th div {
- overflow: hidden;
- position: relative;
- padding-top: 8px;
- left: 4px;
- height: 17px;
- color: #fff;
- font-weight: bold;
-}
-/*.ui-th-column, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column {overflow: hidden;white-space: nowrap;text-align:center;border-top : 0px none;border-bottom : 0px none;}*/
-.ui-th-column, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column {
- overflow: hidden;
- white-space: nowrap;
- border-top: 0px none;
- border-bottom: 0px none;
-}
-.ui-th-ltr, .ui-jqgrid .ui-jqgrid-htable th.ui-th-ltr {border-left : 0px none;}
-.ui-th-rtl, .ui-jqgrid .ui-jqgrid-htable th.ui-th-rtl {border-right : 0px none;}
+.ui-jqgrid .ui-jqgrid-htable {table-layout:fixed;margin:0;}
+.ui-jqgrid .ui-jqgrid-htable th {height:22px;padding: 0 2px 0 2px;}
+.ui-jqgrid .ui-jqgrid-htable th div {overflow: hidden; position:relative; height:17px;}
+.ui-th-column, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column {overflow: hidden;white-space: nowrap;text-align:center;border-top : 0 none;border-bottom : 0 none;}
+.ui-th-ltr, .ui-jqgrid .ui-jqgrid-htable th.ui-th-ltr {border-left : 0 none;}
+.ui-th-rtl, .ui-jqgrid .ui-jqgrid-htable th.ui-th-rtl {border-right : 0 none;}
+.ui-first-th-ltr {border-right: 1px solid; }
+.ui-first-th-rtl {border-left: 1px solid; }
.ui-jqgrid .ui-th-div-ie {white-space: nowrap; zoom :1; height:17px;}
-/*.ui-jqgrid .ui-jqgrid-resize {height:20px !important;position: relative; cursor :e-resize;display: inline;overflow: hidden;}*/
-.ui-jqgrid .ui-jqgrid-resize {
- height: 26px !important;
- position: relative;
- cursor: e-resize;
- display: inline;
- overflow: hidden;
- z-index: 1;
-}
+.ui-jqgrid .ui-jqgrid-resize {height:20px !important;position: relative; cursor :e-resize;display: inline;overflow: hidden;}
.ui-jqgrid .ui-grid-ico-sort {overflow:hidden;position:absolute;display:inline; cursor: pointer !important;}
-/*.ui-jqgrid .ui-icon-asc {margin-top:-3px; height:12px;}*/
-.ui-jqgrid .ui-icon-asc {
- margin-left: 5px;
- margin-top: -5px;
- height: 12px;
-}
-/*.ui-jqgrid .ui-icon-desc {margin-top:3px;height:12px;}*/
-.ui-jqgrid .ui-icon-desc {
- height: 12px;
- margin-top: 2px;
- margin-left: 4px;
-}
-.ui-jqgrid .ui-i-asc {margin-top:0px;height:16px;}
-.ui-jqgrid .ui-i-desc {margin-top:0px;margin-left:13px;height:16px;}
+.ui-jqgrid .ui-icon-asc {margin-top:-3px; height:12px;}
+.ui-jqgrid .ui-icon-desc {margin-top:3px;height:12px;}
+.ui-jqgrid .ui-i-asc {margin-top:0;height:16px;}
+.ui-jqgrid .ui-i-desc {margin-top:0;margin-left:13px;height:16px;}
.ui-jqgrid .ui-jqgrid-sortable {cursor:pointer;}
.ui-jqgrid tr.ui-search-toolbar th { border-top-width: 1px !important; border-top-color: inherit !important; border-top-style: ridge !important }
-tr.ui-search-toolbar input {margin: 1px 0px 0px 0px}
-tr.ui-search-toolbar select {margin: 1px 0px 0px 0px}
-
+tr.ui-search-toolbar input {margin: 1px 0 0 0}
+tr.ui-search-toolbar select {margin: 1px 0 0 0}
/* body */
-.ui-jqgrid .ui-jqgrid-bdiv {position: relative; margin: 0em; padding:0; overflow: auto; text-align:left;}
-.ui-jqgrid .ui-jqgrid-btable {table-layout:fixed; margin:0em;}
-/*.ui-jqgrid tr.jqgrow td {font-weight: normal; overflow: hidden; white-space: pre; height: 22px;padding: 0 2px 0 2px;border-bottom-width: 1px; border-bottom-color: inherit; border-bottom-style: solid;}*/
-.ui-jqgrid tr.jqgrow td {
- font-weight: normal;
- overflow: hidden;
- padding: 2px;
- border-bottom-width: 1px;
- border-bottom-color: #aaa;
- border-bottom-style: solid;
-}
-/*.ui-jqgrid tr.ui-row-ltr td {text-align:left;border-right-width: 1px; border-right-color: inherit; border-right-style: solid;}*/
-.ui-jqgrid tr.ui-row-ltr td {
- vertical-align: middle;
- padding: 6px 3px 4px 2px;
- text-align: left;
-}
+.ui-jqgrid .ui-jqgrid-bdiv {position: relative; margin: 0; padding:0; overflow: auto; text-align:left;}
+.ui-jqgrid .ui-jqgrid-btable {table-layout:fixed; margin:0; outline-style: none; }
+.ui-jqgrid tr.jqgrow { outline-style: none; }
+.ui-jqgrid tr.jqgroup { outline-style: none; }
+.ui-jqgrid tr.jqgrow td {font-weight: normal; overflow: hidden; white-space: pre; height: 22px;padding: 0 2px 0 2px;border-bottom-width: 1px; border-bottom-color: inherit; border-bottom-style: solid;}
+.ui-jqgrid tr.jqgfirstrow td {padding: 0 2px 0 2px;border-right-width: 1px; border-right-style: solid;}
+.ui-jqgrid tr.jqgroup td {font-weight: normal; overflow: hidden; white-space: pre; height: 22px;padding: 0 2px 0 2px;border-bottom-width: 1px; border-bottom-color: inherit; border-bottom-style: solid;}
+.ui-jqgrid tr.jqfoot td {font-weight: bold; overflow: hidden; white-space: pre; height: 22px;padding: 0 2px 0 2px;border-bottom-width: 1px; border-bottom-color: inherit; border-bottom-style: solid;}
+.ui-jqgrid tr.ui-row-ltr td {text-align:left;border-right-width: 1px; border-right-color: inherit; border-right-style: solid;}
.ui-jqgrid tr.ui-row-rtl td {text-align:right;border-left-width: 1px; border-left-color: inherit; border-left-style: solid;}
-.ui-jqgrid td.jqgrid-rownum { padding: 0 2px 0 2px; margin: 0px; border: 0px none;}
-.ui-jqgrid .ui-jqgrid-resize-mark { width:2px; left:0; background-color:#777; cursor: e-resize; cursor: col-resize; position:absolute; top:0; height:100px; overflow:hidden; display:none; border:0 none;}
-
+.ui-jqgrid td.jqgrid-rownum { padding: 0 2px 0 2px; margin: 0; border: 0 none;}
+.ui-jqgrid .ui-jqgrid-resize-mark { width:2px; left:0; background-color:#777; cursor: e-resize; cursor: col-resize; position:absolute; top:0; height:100px; overflow:hidden; display:none; border:0 none; z-index: 99999;}
/* footer */
-.ui-jqgrid .ui-jqgrid-sdiv {position: relative; margin: 0em;padding: 0em; overflow: hidden; border-left: 0px none !important; border-top : 0px none !important; border-right : 0px none !important;}
-.ui-jqgrid .ui-jqgrid-ftable {table-layout:fixed; margin-bottom:0em;}
+.ui-jqgrid .ui-jqgrid-sdiv {position: relative; margin: 0;padding: 0; overflow: hidden; border-left: 0 none !important; border-top : 0 none !important; border-right : 0 none !important;}
+.ui-jqgrid .ui-jqgrid-ftable {table-layout:fixed; margin-bottom:0;}
.ui-jqgrid tr.footrow td {font-weight: bold; overflow: hidden; white-space:nowrap; height: 21px;padding: 0 2px 0 2px;border-top-width: 1px; border-top-color: inherit; border-top-style: solid;}
.ui-jqgrid tr.footrow-ltr td {text-align:left;border-right-width: 1px; border-right-color: inherit; border-right-style: solid;}
.ui-jqgrid tr.footrow-rtl td {text-align:right;border-left-width: 1px; border-left-color: inherit; border-left-style: solid;}
-
/* Pager*/
-.ui-jqgrid .ui-jqgrid-pager { border-left: 0px none !important;border-right: 0px none !important; border-bottom: 0px none !important; margin: 0px !important; padding: 0px !important; position: relative; height: 25px;white-space: nowrap;overflow: hidden;}
+.ui-jqgrid .ui-jqgrid-pager { border-left: 0 none !important;border-right: 0 none !important; border-bottom: 0 none !important; margin: 0 !important; padding: 0 !important; position: relative; height: 25px;white-space: nowrap;overflow: hidden;font-size:11px;}
.ui-jqgrid .ui-pager-control {position: relative;}
-.ui-jqgrid .ui-pg-table {position: relative; padding-bottom:2px; width:auto; margin: 0em;}
+.ui-jqgrid .ui-pg-table {position: relative; padding-bottom:2px; width:auto; margin: 0;}
.ui-jqgrid .ui-pg-table td {font-weight:normal; vertical-align:middle; padding:1px;}
.ui-jqgrid .ui-pg-button { height:19px !important;}
.ui-jqgrid .ui-pg-button span { display: block; margin: 1px; float:left;}
-/*.ui-jqgrid .ui-pg-button:hover { padding: 0px; }*/
-.ui-jqgrid .ui-pg-button:hover {
- padding: 1px;
-}
+.ui-jqgrid .ui-pg-button:hover { padding: 0; }
.ui-jqgrid .ui-state-disabled:hover {padding:1px;}
-.ui-jqgrid .ui-pg-input { height:13px;font-size:.8em; margin: 0em;}
-.ui-jqgrid .ui-pg-selbox {font-size:.8em; line-height:18px; display:block; height:18px; margin: 0em;}
+.ui-jqgrid .ui-pg-input { height:13px;font-size:.8em; margin: 0;}
+.ui-jqgrid .ui-pg-selbox {font-size:.8em; line-height:18px; display:block; height:18px; margin: 0;}
.ui-jqgrid .ui-separator {height: 18px; border-left: 1px solid #ccc ; border-right: 1px solid #ccc ; margin: 1px; float: right;}
.ui-jqgrid .ui-paging-info {font-weight: normal;height:19px; margin-top:3px;margin-right:4px;}
-.ui-jqgrid .ui-jqgrid-pager .ui-pg-div {padding:1px 0;float:left;list-style-image:none;list-style-position:outside;list-style-type:none;position:relative;}
+.ui-jqgrid .ui-jqgrid-pager .ui-pg-div {padding:1px 0;float:left;position:relative;}
.ui-jqgrid .ui-jqgrid-pager .ui-pg-button { cursor:pointer; }
.ui-jqgrid .ui-jqgrid-pager .ui-pg-div span.ui-icon {float:left;margin:0 2px;}
-.ui-jqgrid td input, .ui-jqgrid td select .ui-jqgrid td textarea { margin: 0em;}
+.ui-jqgrid td input, .ui-jqgrid td select .ui-jqgrid td textarea { margin: 0;}
.ui-jqgrid td textarea {width:auto;height:auto;}
-.ui-jqgrid .ui-jqgrid-toppager {border-left: 0px none !important;border-right: 0px none !important; border-top: 0px none !important; margin: 0px !important; padding: 0px !important; position: relative; height: 25px !important;white-space: nowrap;overflow: hidden;}
-
-/* subgrid */
+.ui-jqgrid .ui-jqgrid-toppager {border-left: 0 none !important;border-right: 0 none !important; border-top: 0 none !important; margin: 0 !important; padding: 0 !important; position: relative; height: 25px !important;white-space: nowrap;overflow: hidden;}
+.ui-jqgrid .ui-jqgrid-toppager .ui-pg-div {padding:1px 0;float:left;position:relative;}
+.ui-jqgrid .ui-jqgrid-toppager .ui-pg-button { cursor:pointer; }
+.ui-jqgrid .ui-jqgrid-toppager .ui-pg-div span.ui-icon {float:left;margin:0 2px;}
+/*subgrid*/
.ui-jqgrid .ui-jqgrid-btable .ui-sgcollapsed span {display: block;}
-.ui-jqgrid .ui-subgrid {margin:0em;padding:0em; width:100%;}
+.ui-jqgrid .ui-subgrid {margin:0;padding:0; width:100%;}
.ui-jqgrid .ui-subgrid table {table-layout: fixed;}
.ui-jqgrid .ui-subgrid tr.ui-subtblcell td {height:18px;border-right-width: 1px; border-right-color: inherit; border-right-style: solid;border-bottom-width: 1px; border-bottom-color: inherit; border-bottom-style: solid;}
-.ui-jqgrid .ui-subgrid td.subgrid-data {border-top: 0px none !important;}
-.ui-jqgrid .ui-subgrid td.subgrid-cell {border-width: 0px 0px 1px 0px;}
+.ui-jqgrid .ui-subgrid td.subgrid-data {border-top: 0 none !important;}
+.ui-jqgrid .ui-subgrid td.subgrid-cell {border-width: 0 0 1px 0;}
.ui-jqgrid .ui-th-subgrid {height:20px;}
-
/* loading */
-.ui-jqgrid .loading {position: absolute; top: 45%;left: 45%;width: auto;z-index:101;padding: 6px; margin: 5px;text-align: center;font-weight: bold;display: none;border-width: 2px !important;}
+.ui-jqgrid .loading {position: absolute; top: 45%;left: 45%;width: auto;z-index:101;padding: 6px; margin: 5px;text-align: center;font-weight: bold;display: none;border-width: 2px !important; font-size:11px;}
.ui-jqgrid .jqgrid-overlay {display:none;z-index:100;}
-* html .jqgrid-overlay {width: expression(this.parentNode.offsetWidth+'px');height: expression(this.parentNode.offsetHeight+'px');}
-* .jqgrid-overlay iframe {position:absolute;top:0;left:0;z-index:-1;width: expression(this.parentNode.offsetWidth+'px');height: expression(this.parentNode.offsetHeight+'px');}
+/* IE * html .jqgrid-overlay {width: expression(this.parentNode.offsetWidth+'px');height: expression(this.parentNode.offsetHeight+'px');} */
+* .jqgrid-overlay iframe {position:absolute;top:0;left:0;z-index:-1;}
+/* IE width: expression(this.parentNode.offsetWidth+'px');height: expression(this.parentNode.offsetHeight+'px');}*/
/* end loading div */
-
/* toolbar */
-.ui-jqgrid .ui-userdata {border-left: 0px none; border-right: 0px none; height : 21px;overflow: hidden; }
-
+.ui-jqgrid .ui-userdata {border-left: 0 none; border-right: 0 none; height : 21px;overflow: hidden; }
/*Modal Window */
.ui-jqdialog { display: none; width: 300px; position: absolute; padding: .2em; font-size:11px; overflow:visible;}
.ui-jqdialog .ui-jqdialog-titlebar { padding: .3em .2em; position: relative; }
.ui-jqdialog .ui-jqdialog-title { margin: .1em 0 .2em; }
-.ui-jqdialog .ui-jqdialog-titlebar-close { position: absolute; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
+.ui-jqdialog .ui-jqdialog-titlebar-close { position: absolute; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; cursor:pointer;}
+
.ui-jqdialog .ui-jqdialog-titlebar-close span { display: block; margin: 1px; }
.ui-jqdialog .ui-jqdialog-titlebar-close:hover, .ui-jqdialog .ui-jqdialog-titlebar-close:focus { padding: 0; }
.ui-jqdialog-content, .ui-jqdialog .ui-jqdialog-content { border: 0; padding: .3em .2em; background: none; height:auto;}
.ui-jqdialog .ui-jqconfirm {padding: .4em 1em; border-width:3px;position:absolute;bottom:10px;right:10px;overflow:visible;display:none;height:80px;width:220px;text-align:center;}
+.ui-jqdialog>.ui-resizable-se { bottom: -3px; right: -3px}
+.ui-jqgrid>.ui-resizable-se { bottom: -3px; right: -3px }
/* end Modal window*/
-
/* Form edit */
-.ui-jqdialog-content .FormGrid {margin: 0px;}
-.ui-jqdialog-content .EditTable { width: 100%; margin-bottom:0em;}
-.ui-jqdialog-content .DelTable { width: 100%; margin-bottom:0em;}
-.EditTable td input, .EditTable td select, .EditTable td textarea {margin: 0em;}
+.ui-jqdialog-content .FormGrid {margin: 0;}
+.ui-jqdialog-content .EditTable { width: 100%; margin-bottom:0;}
+.ui-jqdialog-content .DelTable { width: 100%; margin-bottom:0;}
+.EditTable td input, .EditTable td select, .EditTable td textarea {margin: 0;}
.EditTable td textarea { width:auto; height:auto;}
-.ui-jqdialog-content td.EditButton {text-align: right;border-top: 0px none;border-left: 0px none;border-right: 0px none; padding-bottom:5px; padding-top:5px;}
-.ui-jqdialog-content td.navButton {text-align: center; border-left: 0px none;border-top: 0px none;border-right: 0px none; padding-bottom:5px; padding-top:5px;}
-.ui-jqdialog-content .CaptionTD {text-align: left; vertical-align: top;border-left: 0px none;border-right: 0px none; border-bottom: 0px none; padding: 1px;white-space: nowrap;}
-.ui-jqdialog-content .DataTD {padding: 1px;border-left: 0px none;border-right: 0px none; border-bottom: 0px none; vertical-align: top;}
+.ui-jqdialog-content td.EditButton {text-align: right;border-top: 0 none;border-left: 0 none;border-right: 0 none; padding-bottom:5px; padding-top:5px;}
+.ui-jqdialog-content td.navButton {text-align: center; border-left: 0 none;border-top: 0 none;border-right: 0 none; padding-bottom:5px; padding-top:5px;}
+.ui-jqdialog-content input.FormElement {padding:.3em}
+.ui-jqdialog-content select.FormElement {padding:.3em}
+.ui-jqdialog-content .data-line {padding-top:.1em;border: 0 none;}
+
+.ui-jqdialog-content .CaptionTD {vertical-align: middle;border: 0 none; padding: 2px;white-space: nowrap;}
+.ui-jqdialog-content .DataTD {padding: 2px; border: 0 none; vertical-align: top;}
.ui-jqdialog-content .form-view-data {white-space:pre}
.fm-button { display: inline-block; margin:0 4px 0 0; padding: .4em .5em; text-decoration:none !important; cursor:pointer; position: relative; text-align: center; zoom: 1; }
.fm-button-icon-left { padding-left: 1.9em; }
@@ -184,29 +123,49 @@ tr.ui-search-toolbar select {margin: 1px 0px 0px 0px}
.fm-button-icon-right .ui-icon { left: auto; right: .2em; margin-left: 0; position: absolute; top: 50%; margin-top: -8px;}
#nData, #pData { float: left; margin:3px;padding: 0; width: 15px; }
/* End Eorm edit */
-
/*.ui-jqgrid .edit-cell {}*/
-.ui-jqgrid .selected-row, div.ui-jqgrid .selected-row td {font-style : normal;border-left: 0px none;}
-
+.ui-jqgrid .selected-row, div.ui-jqgrid .selected-row td {font-style : normal;border-left: 0 none;}
+/* inline edit actions button*/
+.ui-inline-del.ui-state-hover span, .ui-inline-edit.ui-state-hover span,
+.ui-inline-save.ui-state-hover span, .ui-inline-cancel.ui-state-hover span {
+ margin: -1px;
+}
/* Tree Grid */
.ui-jqgrid .tree-wrap {float: left; position: relative;height: 18px;white-space: nowrap;overflow: hidden;}
.ui-jqgrid .tree-minus {position: absolute; height: 18px; width: 18px; overflow: hidden;}
.ui-jqgrid .tree-plus {position: absolute; height: 18px; width: 18px; overflow: hidden;}
.ui-jqgrid .tree-leaf {position: absolute; height: 18px; width: 18px;overflow: hidden;}
.ui-jqgrid .treeclick {cursor: pointer;}
-
/* moda dialog */
-.jqmOverlay { background-color: #000; }
-* iframe.jqm {position:absolute;top:0;left:0;z-index:-1;width: expression(this.parentNode.offsetWidth+'px');height: expression(this.parentNode.offsetHeight+'px');}
+* iframe.jqm {position:absolute;top:0;left:0;z-index:-1;}
+/* width: expression(this.parentNode.offsetWidth+'px');height: expression(this.parentNode.offsetHeight+'px');}*/
.ui-jqgrid-dnd tr td {border-right-width: 1px; border-right-color: inherit; border-right-style: solid; height:20px}
-
/* RTL Support */
-.ui-jqgrid .ui-jqgrid-title-rtl {float:right;margin: .1em 0 .2em; }
+.ui-jqgrid .ui-jqgrid-caption-rtl {text-align: right;}
.ui-jqgrid .ui-jqgrid-hbox-rtl {float: right; padding-left: 20px;}
-.ui-jqgrid .ui-jqgrid-resize-ltr {float: right;margin: -2px -2px -2px 0px;}
-.ui-jqgrid .ui-jqgrid-resize-rtl {float: left;margin: -2px 0px -1px -3px;}
-.ui-jqgrid .ui-sort-rtl {left:0px;}
+.ui-jqgrid .ui-jqgrid-resize-ltr {float: right;margin: -2px -2px -2px 0;}
+.ui-jqgrid .ui-jqgrid-resize-rtl {float: left;margin: -2px 0 -1px -3px;}
+.ui-jqgrid .ui-sort-rtl {left:0;}
.ui-jqgrid .tree-wrap-ltr {float: left;}
.ui-jqgrid .tree-wrap-rtl {float: right;}
-.ui-jqgrid .ui-ellipsis {text-overflow:ellipsis; -moz-binding:url('ellipsis-xbl.xml#ellipsis');}
+.ui-jqgrid .ui-ellipsis {-moz-text-overflow:ellipsis;text-overflow:ellipsis;}
+/* Toolbar Search Menu */
+.ui-search-menu { position: absolute; padding: 2px 5px;}
+.ui-jqgrid .ui-search-table { padding: 0; border: 0 none; height:20px; width:100%;}
+.ui-jqgrid .ui-search-table .ui-search-oper { width:20px; }
+a.g-menu-item, a.soptclass, a.clearsearchclass { cursor: pointer; }
+.ui-jqgrid .ui-search-table .ui-search-input>input,
+.ui-jqgrid .ui-search-table .ui-search-input>select
+{
+ display: block;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.ui-jqgrid .ui-jqgrid-view input,
+.ui-jqgrid .ui-jqgrid-view select,
+.ui-jqgrid .ui-jqgrid-view textarea,
+.ui-jqgrid .ui-jqgrid-view button {
+ font-size: 11px
+}
diff --git a/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/js/i18n/grid.locale-en.js b/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/js/i18n/grid.locale-en.js
old mode 100755
new mode 100644
index 7b12acfa1b..6929885ecf
--- a/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/js/i18n/grid.locale-en.js
+++ b/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/js/i18n/grid.locale-en.js
@@ -1,5 +1,170 @@
-(function (a) {
- a.jgrid = {defaults: {recordtext: "View {0} - {1} of {2}", emptyrecords: "No records to view", loadtext: "Loading...", pgtext: "Page {0} of {1}"}, search: {caption: "Search...", Find: "Find", Reset: "Reset", odata: ["equal", "not equal", "less", "less or equal", "greater", "greater or equal", "begins with", "does not begin with", "is in", "is not in", "ends with", "does not end with", "contains", "does not contain"], groupOps: [{op: "AND", text: "all"}, {op: "OR", text: "any"}], matchText: " match", rulesText: " rules"}, edit: {addCaption: "Add Record", editCaption: "Edit Record", bSubmit: "Submit", bCancel: "Cancel", bClose: "Close", saveData: "Data has been changed! Save changes?", bYes: "Yes", bNo: "No", bExit: "Cancel", msg: {required: "Field is required", number: "Please, enter valid number", minValue: "value must be greater than or equal to ", maxValue: "value must be less than or equal to", email: "is not a valid e-mail", integer: "Please, enter valid integer value", date: "Please, enter valid date value", url: "is not a valid URL. Prefix required ('http://' or 'https://')", nodefined: " is not defined!", novalue: " return value is required!", customarray: "Custom function should return array!", customfcheck: "Custom function should be present in case of custom checking!"}}, view: {caption: "View Record", bClose: "Close"}, del: {caption: "Delete", msg: "Delete selected record(s)?", bSubmit: "Delete", bCancel: "Cancel"}, nav: {edittext: "", edittitle: "Edit selected row", addtext: "", addtitle: "Add new row", deltext: "", deltitle: "Delete selected row", searchtext: "", searchtitle: "Find records", refreshtext: "", refreshtitle: "Reload Grid", alertcap: "Warning", alerttext: "Please, select row", viewtext: "", viewtitle: "View selected row"}, col: {caption: "Select columns", bSubmit: "Ok", bCancel: "Cancel"}, errors: {errcap: "Error", nourl: "No url is set", norecords: "No records to process", model: "Length of colNames <> colModel!"}, formatter: {integer: {thousandsSeparator: " ", defaultValue: "0"}, number: {decimalSeparator: ".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: "0.00"}, currency: {decimalSeparator: ".", thousandsSeparator: " ", decimalPlaces: 2, prefix: "", suffix: "", defaultValue: "0.00"}, date: {dayNames: ["Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], monthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], AmPm: ["am", "pm", "AM", "PM"], S: function (b) {
- return b < 11 || b > 13 ? ["st", "nd", "rd", "th"][Math.min((b - 1) % 10, 3)] : "th"
- }, srcformat: "Y-m-d", newformat: "d/m/Y", masks: {ISO8601Long: "Y-m-d H:i:s", ISO8601Short: "Y-m-d", ShortDate: "n/j/Y", LongDate: "l, F d, Y", FullDateTime: "l, F d, Y g:i:s A", MonthDay: "F d", ShortTime: "g:i A", LongTime: "g:i:s A", SortableDateTime: "Y-m-d\\TH:i:s", UniversalSortableDateTime: "Y-m-d H:i:sO", YearMonth: "F, Y"}, reformatAfterEdit: false}, baseLinkUrl: "", showAction: "", target: "", checkbox: {disabled: true}, idName: "id"}}
-})(jQuery);
\ No newline at end of file
+;(function($){
+/**
+ * jqGrid English Translation
+ * Tony Tomov tony@trirand.com
+ * http://trirand.com/blog/
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+**/
+$.jgrid = $.jgrid || {};
+$.extend($.jgrid,{
+ defaults : {
+ recordtext: "View {0} - {1} of {2}",
+ emptyrecords: "No records to view",
+ loadtext: "Loading...",
+ pgtext : "Page {0} of {1}"
+ },
+ search : {
+ caption: "Search...",
+ Find: "Find",
+ Reset: "Reset",
+ odata: [{ oper:'eq', text:'equal'},{ oper:'ne', text:'not equal'},{ oper:'lt', text:'less'},{ oper:'le', text:'less or equal'},{ oper:'gt', text:'greater'},{ oper:'ge', text:'greater or equal'},{ oper:'bw', text:'begins with'},{ oper:'bn', text:'does not begin with'},{ oper:'in', text:'is in'},{ oper:'ni', text:'is not in'},{ oper:'ew', text:'ends with'},{ oper:'en', text:'does not end with'},{ oper:'cn', text:'contains'},{ oper:'nc', text:'does not contain'},{ oper:'nu', text:'is null'},{ oper:'nn', text:'is not null'}],
+ groupOps: [{ op: "AND", text: "all" },{ op: "OR", text: "any" }],
+ operandTitle : "Click to select search operation.",
+ resetTitle : "Reset Search Value"
+ },
+ edit : {
+ addCaption: "Add Record",
+ editCaption: "Edit Record",
+ bSubmit: "Submit",
+ bCancel: "Cancel",
+ bClose: "Close",
+ saveData: "Data has been changed! Save changes?",
+ bYes : "Yes",
+ bNo : "No",
+ bExit : "Cancel",
+ msg: {
+ required:"Field is required",
+ number:"Please, enter valid number",
+ minValue:"value must be greater than or equal to ",
+ maxValue:"value must be less than or equal to",
+ email: "is not a valid e-mail",
+ integer: "Please, enter valid integer value",
+ date: "Please, enter valid date value",
+ url: "is not a valid URL. Prefix required ('http://' or 'https://')",
+ nodefined : " is not defined!",
+ novalue : " return value is required!",
+ customarray : "Custom function should return array!",
+ customfcheck : "Custom function should be present in case of custom checking!"
+
+ }
+ },
+ view : {
+ caption: "View Record",
+ bClose: "Close"
+ },
+ del : {
+ caption: "Delete",
+ msg: "Delete selected record(s)?",
+ bSubmit: "Delete",
+ bCancel: "Cancel"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "Edit selected row",
+ addtext:"",
+ addtitle: "Add new row",
+ deltext: "",
+ deltitle: "Delete selected row",
+ searchtext: "",
+ searchtitle: "Find records",
+ refreshtext: "",
+ refreshtitle: "Reload Grid",
+ alertcap: "Warning",
+ alerttext: "Please, select row",
+ viewtext: "",
+ viewtitle: "View selected row"
+ },
+ col : {
+ caption: "Select columns",
+ bSubmit: "Ok",
+ bCancel: "Cancel"
+ },
+ errors : {
+ errcap : "Error",
+ nourl : "No url is set",
+ norecords: "No records to process",
+ model : "Length of colNames <> colModel!"
+ },
+ formatter : {
+ integer : {thousandsSeparator: ",", defaultValue: '0'},
+ number : {decimalSeparator:".", thousandsSeparator: ",", decimalPlaces: 2, defaultValue: '0.00'},
+ currency : {decimalSeparator:".", thousandsSeparator: ",", decimalPlaces: 2, prefix: "", suffix:"", defaultValue: '0.00'},
+ date : {
+ dayNames: [
+ "Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat",
+ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
+ ],
+ monthNames: [
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
+ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+ ],
+ AmPm : ["am","pm","AM","PM"],
+ S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th';},
+ srcformat: 'Y-m-d',
+ newformat: 'n/j/Y',
+ parseRe : /[#%\\\/:_;.,\t\s-]/,
+ masks : {
+ // see http://php.net/manual/en/function.date.php for PHP format used in jqGrid
+ // and see http://docs.jquery.com/UI/Datepicker/formatDate
+ // and https://github.com/jquery/globalize#dates for alternative formats used frequently
+ // one can find on https://github.com/jquery/globalize/tree/master/lib/cultures many
+ // information about date, time, numbers and currency formats used in different countries
+ // one should just convert the information in PHP format
+ ISO8601Long:"Y-m-d H:i:s",
+ ISO8601Short:"Y-m-d",
+ // short date:
+ // n - Numeric representation of a month, without leading zeros
+ // j - Day of the month without leading zeros
+ // Y - A full numeric representation of a year, 4 digits
+ // example: 3/1/2012 which means 1 March 2012
+ ShortDate: "n/j/Y", // in jQuery UI Datepicker: "M/d/yyyy"
+ // long date:
+ // l - A full textual representation of the day of the week
+ // F - A full textual representation of a month
+ // d - Day of the month, 2 digits with leading zeros
+ // Y - A full numeric representation of a year, 4 digits
+ LongDate: "l, F d, Y", // in jQuery UI Datepicker: "dddd, MMMM dd, yyyy"
+ // long date with long time:
+ // l - A full textual representation of the day of the week
+ // F - A full textual representation of a month
+ // d - Day of the month, 2 digits with leading zeros
+ // Y - A full numeric representation of a year, 4 digits
+ // g - 12-hour format of an hour without leading zeros
+ // i - Minutes with leading zeros
+ // s - Seconds, with leading zeros
+ // A - Uppercase Ante meridiem and Post meridiem (AM or PM)
+ FullDateTime: "l, F d, Y g:i:s A", // in jQuery UI Datepicker: "dddd, MMMM dd, yyyy h:mm:ss tt"
+ // month day:
+ // F - A full textual representation of a month
+ // d - Day of the month, 2 digits with leading zeros
+ MonthDay: "F d", // in jQuery UI Datepicker: "MMMM dd"
+ // short time (without seconds)
+ // g - 12-hour format of an hour without leading zeros
+ // i - Minutes with leading zeros
+ // A - Uppercase Ante meridiem and Post meridiem (AM or PM)
+ ShortTime: "g:i A", // in jQuery UI Datepicker: "h:mm tt"
+ // long time (with seconds)
+ // g - 12-hour format of an hour without leading zeros
+ // i - Minutes with leading zeros
+ // s - Seconds, with leading zeros
+ // A - Uppercase Ante meridiem and Post meridiem (AM or PM)
+ LongTime: "g:i:s A", // in jQuery UI Datepicker: "h:mm:ss tt"
+ SortableDateTime: "Y-m-d\\TH:i:s",
+ UniversalSortableDateTime: "Y-m-d H:i:sO",
+ // month with year
+ // Y - A full numeric representation of a year, 4 digits
+ // F - A full textual representation of a month
+ YearMonth: "F, Y" // in jQuery UI Datepicker: "MMMM, yyyy"
+ },
+ reformatAfterEdit : false
+ },
+ baseLinkUrl: '',
+ showAction: '',
+ target: '',
+ checkbox : {disabled:true},
+ idName : 'id'
+ }
+});
+})(jQuery);
diff --git a/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/js/jquery.jqGrid.min.js b/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/js/jquery.jqGrid.min.js
old mode 100755
new mode 100644
index 5ce272fb39..340d0a008c
--- a/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/js/jquery.jqGrid.min.js
+++ b/nar-bundles/monitor-threshold-bundle/ui/src/main/webapp/js/jquery/jqgrid/js/jquery.jqGrid.min.js
@@ -1,416 +1,545 @@
/*
- * jqGrid 3.6.5 - jQuery Grid
- * Copyright (c) 2008, Tony Tomov, tony@trirand.com
- * Dual licensed under the MIT and GPL licenses
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl-2.0.html
- * Date:2010-05-05
- * Modules: grid.base.js; jquery.fmatter.js; grid.custom.js; grid.common.js; grid.formedit.js; jquery.searchFilter.js; grid.inlinedit.js; grid.celledit.js; jqModal.js; jqDnR.js; grid.subgrid.js; grid.treegrid.js; grid.import.js; JsonXml.js; grid.setcolumns.js; grid.postext.js; grid.tbltogrid.js; grid.jqueryui.js;
- */
-(function(b){b.jgrid = b.jgrid || {}; b.extend(b.jgrid, {htmlDecode:function(f){if (f == " " || f == " " || f.length == 1 && f.charCodeAt(0) == 160)return""; return!f?f:String(f).replace(/&/g, "&").replace(/>/g, ">").replace(/</g, "<").replace(/"/g, '"')}, htmlEncode:function(f){return!f?f:String(f).replace(/&/g, "&").replace(/>/g, ">").replace(/])*>/gi; if (f)return(f = f.replace(k, "")) && f !== " " && f !== " "?f.replace(/\"/g, "'"):""; else return f}, stringToDoc:function(f){var k; if (typeof f !== "string")return f; try{k = (new DOMParser).parseFromString(f, "text/xml")} catch (i){k = new ActiveXObject("Microsoft.XMLDOM");
- k.async = false; k.loadXML(f)}return k && k.documentElement && k.documentElement.tagName != "parsererror"?k:null}, parse:function(f){f = f; if (f.substr(0, 9) == "while(1);")f = f.substr(9); if (f.substr(0, 2) == "/*")f = f.substr(2, f.length - 4); f || (f = "{}"); return b.jgrid.useJSON === true && typeof JSON === "object" && typeof JSON.parse === "function"?JSON.parse(f):eval("(" + f + ")")}, jqID:function(f){f += ""; return f.replace(/([\.\:\[\]])/g, "\\$1")}, ajaxOptions:{}, extend:function(f){b.extend(b.fn.jqGrid, f); this.no_legacy_api || b.fn.extend(f)}});
- b.fn.jqGrid = function(f){if (typeof f == "string"){var k = b.fn.jqGrid[f]; if (!k)throw"jqGrid - No such method: " + f; var i = b.makeArray(arguments).slice(1); return k.apply(this, i)}return this.each(function(){if (!this.grid){var h = b.extend(true, {url:"", height:150, page:1, rowNum:20, records:0, pager:"", pgbuttons:true, pginput:true, colModel:[], rowList:[], colNames:[], sortorder:"asc", sortname:"", datatype:"xml", mtype:"GET", altRows:false, selarrrow:[], savedRow:[], shrinkToFit:true, xmlReader:{}, jsonReader:{}, subGrid:false,
- subGridModel:[], reccount:0, lastpage:0, lastsort:0, selrow:null, beforeSelectRow:null, onSelectRow:null, onSortCol:null, ondblClickRow:null, onRightClickRow:null, onPaging:null, onSelectAll:null, loadComplete:null, gridComplete:null, loadError:null, loadBeforeSend:null, afterInsertRow:null, beforeRequest:null, onHeaderClick:null, viewrecords:false, loadonce:false, multiselect:false, multikey:false, editurl:null, search:false, caption:"", hidegrid:true, hiddengrid:false, postData:{}, userData:{}, treeGrid:false, treeGridModel:"nested",
- treeReader:{}, treeANode: - 1, ExpandColumn:null, tree_root_level:0, prmNames:{page:"page", rows:"rows", sort:"sidx", order:"sord", search:"_search", nd:"nd", id:"id", oper:"oper", editoper:"edit", addoper:"add", deloper:"del", subgridid:"id", npage:null}, forceFit:false, gridstate:"visible", cellEdit:false, cellsubmit:"remote", nv:0, loadui:"enable", toolbar:[false, ""], scroll:false, multiboxonly:false, deselectAfterSort:true, scrollrows:false, autowidth:false, scrollOffset:18, cellLayout:5, subGridWidth:20, multiselectWidth:20,
- gridview:false, rownumWidth:25, rownumbers:false, pagerpos:"center", recordpos:"right", footerrow:false, userDataOnFooter:false, hoverrows:true, altclass:"ui-priority-secondary", viewsortcols:[false, "vertical", true], resizeclass:"", autoencode:false, remapColumns:[], ajaxGridOptions:{}, direction:"ltr", toppager:false, headertitles:false, scrollTimeout:200}, b.jgrid.defaults, f || {}), g = {headers:[], cols:[], footers:[], dragStart:function(c, d, e){this.resizing = {idx:c, startX:d.clientX, sOL:e[0]}; this.hDiv.style.cursor = "col-resize";
- this.curGbox = b("#rs_m" + h.id, "#gbox_" + h.id); this.curGbox.css({display:"block", left:e[0], top:e[1], height:e[2]}); b.isFunction(h.resizeStart) && h.resizeStart.call(this, d, c); document.onselectstart = function(){return false}}, dragMove:function(c){if (this.resizing){var d = c.clientX - this.resizing.startX; c = this.headers[this.resizing.idx]; var e = h.direction === "ltr"?c.width + d:c.width - d, l; if (e > 33){this.curGbox.css({left:this.resizing.sOL + d}); if (h.forceFit === true){l = this.headers[this.resizing.idx + h.nv]; d = h.direction ===
- "ltr"?l.width - d:l.width + d; if (d > 33){c.newWidth = e; l.newWidth = d}} else{this.newWidth = h.direction === "ltr"?h.tblwidth + d:h.tblwidth - d; c.newWidth = e}}}}, dragEnd:function(){this.hDiv.style.cursor = "default"; if (this.resizing){var c = this.resizing.idx, d = this.headers[c].newWidth || this.headers[c].width; d = parseInt(d, 10); this.resizing = false; b("#rs_m" + h.id).css("display", "none"); h.colModel[c].width = d; this.headers[c].width = d; this.headers[c].el.style.width = d + "px"; if (this.cols.length > 0)this.cols[c].style.width = d + "px";
- if (this.footers.length > 0)this.footers[c].style.width = d + "px"; if (h.forceFit === true){d = this.headers[c + h.nv].newWidth || this.headers[c + h.nv].width; this.headers[c + h.nv].width = d; this.headers[c + h.nv].el.style.width = d + "px"; if (this.cols.length > 0)this.cols[c + h.nv].style.width = d + "px"; if (this.footers.length > 0)this.footers[c + h.nv].style.width = d + "px"; h.colModel[c + h.nv].width = d} else{h.tblwidth = this.newWidth || h.tblwidth; b("table:first", this.bDiv).css("width", h.tblwidth + "px"); b("table:first", this.hDiv).css("width",
- h.tblwidth + "px"); this.hDiv.scrollLeft = this.bDiv.scrollLeft; if (h.footerrow){b("table:first", this.sDiv).css("width", h.tblwidth + "px"); this.sDiv.scrollLeft = this.bDiv.scrollLeft}}b.isFunction(h.resizeStop) && h.resizeStop.call(this, d, c)}this.curGbox = null; document.onselectstart = function(){return true}}, populateVisible:function(){g.timer && clearTimeout(g.timer); g.timer = null; var c = b(g.bDiv).height(); if (c){var d = b("table:first", g.bDiv), e = b("> tbody > tr:visible:first", d).outerHeight() || g.prevRowHeight; if (e){g.prevRowHeight =
- e; var l = h.rowNum, n = g.scrollTop = g.bDiv.scrollTop, o = Math.round(d.position().top) - n, p = o + d.height(); e = e * l; var w, y, s; if (o <= 0 && (h.lastpage === undefined || parseInt((p + n + e - 1) / e, 10) <= h.lastpage)){y = parseInt((c - p + e - 1) / e, 10); if (p >= 0 || y < 2 || h.scroll === true){w = Math.round((p + n) / e) + 1; o = - 1} else o = 1}if (o > 0){w = parseInt(n / e, 10) + 1; y = parseInt((n + c) / e, 10) + 2 - w; s = true}if (y)if (!(h.lastpage && w > h.lastpage))if (g.hDiv.loading)g.timer = setTimeout(g.populateVisible, h.scrollTimeout); else{h.page = w; if (s){g.selectionPreserver(d[0]); g.emptyRows(g.bDiv,
- false)}g.populate(y)}}}}, scrollGrid:function(){if (h.scroll){var c = g.bDiv.scrollTop; if (c != g.scrollTop){g.scrollTop = c; g.timer && clearTimeout(g.timer); g.timer = setTimeout(g.populateVisible, 200)}}g.hDiv.scrollLeft = g.bDiv.scrollLeft; if (h.footerrow)g.sDiv.scrollLeft = g.bDiv.scrollLeft}, selectionPreserver:function(c){var d = c.p, e = d.selrow, l = d.selarrrow?b.makeArray(d.selarrrow):null, n = c.grid.bDiv.scrollLeft, o = d.gridComplete; d.gridComplete = function(){d.selrow = null; d.selarrrow = []; if (d.multiselect && l && l.length >
- 0)for (var p = 0; p < l.length; p++)l[p] != e && b(c).jqGrid("setSelection", l[p], false); e && b(c).jqGrid("setSelection", e, false); c.grid.bDiv.scrollLeft = n; d.gridComplete = o; d.gridComplete && o()}}}; this.p = h; var j, m, a; if (this.p.colNames.length === 0)for (j = 0; j < this.p.colModel.length; j++)this.p.colNames[j] = this.p.colModel[j].label || this.p.colModel[j].name; if (this.p.colNames.length !== this.p.colModel.length)alert(b.jgrid.errors.model); else{var q = b("
"), t, x = b.browser.msie?true:false, C = b.browser.safari?
- true:false; a = this; a.p.direction = b.trim(a.p.direction.toLowerCase()); if (b.inArray(a.p.direction, ["ltr", "rtl"]) == - 1)a.p.direction = "ltr"; m = a.p.direction; b(q).insertBefore(this); b(this).appendTo(q).removeClass("scroll"); var K = b(""); b(K).insertBefore(q).attr({id:"gbox_" + this.id, dir:m}); b(q).appendTo(K).attr("id", "gview_" + this.id); t = x && b.browser.version <= 6?'':
- ""; b("").append(t).insertBefore(q); b("
" + this.p.loadtext + "
").insertBefore(q); b(this).attr({cellSpacing:"0", cellPadding:"0", border:"0", role:"grid", "aria-multiselectable":!!this.p.multiselect, "aria-labelledby":"gbox_" + this.id}); var J = function(c, d){c = parseInt(c, 10); return isNaN(c)?d?d:0:c}, F = function(c, d, e){var l = a.p.colModel[c], n = l.align, o = 'style="',
- p = l.classes, w = l.name; if (n)o += "text-align:" + n + ";"; if (l.hidden === true)o += "display:none;"; if (d === 0)o += "width: " + g.headers[c].width + "px;"; o += '"' + (p !== undefined?' class="' + p + '"':"") + (l.title && e?' title="' + b.jgrid.stripHtml(e) + '"':""); o += ' aria-describedby="' + a.p.id + "_" + w + '"'; return o}, Q = function(c){return c === undefined || c === null || c === ""?" ":a.p.autoencode?b.jgrid.htmlEncode(c):c + ""}, M = function(c, d, e, l, n){e = a.p.colModel[e]; if (typeof e.formatter !== "undefined"){c = {rowId:c, colModel:e, gid:a.p.id}; d = b.isFunction(e.formatter)?
- e.formatter.call(a, d, c, l, n):b.fmatter?b.fn.fmatter(e.formatter, d, c, l, n):Q(d)} else d = Q(d); return d}, R = function(c, d, e, l, n){c = M(c, d, e, n, "add"); return'
" + c + "
"}, u = function(c, d, e){c = ''; d = F(d, e, ""); return'
" + c + "
"}, la = function(c, d, e, l){e = (parseInt(e, 10) - 1) * parseInt(l, 10) + 1 + d; c = F(c, d, ""); return'
" + e + "
"}, ca = function(c){var d, e = [], l = 0, n; for (n = 0; n < a.p.colModel.length; n++){d = a.p.colModel[n]; if (d.name !== "cb" && d.name !== "subgrid" && d.name !== "rn"){e[l] = c == "xml"?d.xmlmap || d.name:d.jsonmap || d.name; l++}}return e}, fa = function(c){var d = a.p.remapColumns; if (!d || !d.length)d = b.map(a.p.colModel, function(e, l){return l}); if (c)d = b.map(d, function(e){return e < c?null:e - c}); return d}, aa = function(c, d){a.p.deepempty?b("tbody:first tr", c).remove():b("tbody:first",
- c).empty(); if (d && a.p.scroll){b(">div:first", c).css({height:"auto"}).children("div:first").css({height:0, display:"none"}); c.scrollTop = 0}}, U = function(c, d){var e, l, n, o; if (typeof d === "function")return d(c); e = c[d]; if (e === undefined){if (typeof d === "string")n = d.split("."); try{if (o = n.length)for (e = c; e && o--; ){l = n.shift(); e = e[l]}} catch (p){}}return e}, ia = function(c, d, e, l, n){var o = new Date; a.p.reccount = 0; if (b.isXMLDoc(c)){if (a.p.treeANode === - 1 && !a.p.scroll){aa(d, false); e = 0} else e = e > 0?e:0; var p, w = 0, y, s, r = 0, v = 0,
- z = 0, D, N, L = [], P, G = {}, da = a.rows.length, E, W, B = [], S = 0, ga = a.p.altRows === true?" " + a.p.altclass:""; a.p.xmlReader.repeatitems || (L = ca("xml")); D = a.p.keyIndex === false?a.p.xmlReader.id:a.p.keyIndex; if (L.length > 0 && !isNaN(D)){if (a.p.remapColumns && a.p.remapColumns.length)D = b.inArray(D, a.p.remapColumns); D = L[D]}N = (D + "").indexOf("[") === - 1?L.length?function(X, V){return b(D, X).text() || V}:function(X, V){return b(a.p.xmlReader.cell, X).eq(D).text() || V}:function(X, V){return X.getAttribute(D.replace(/[\[\]]/g, "")) || V}; a.p.userData =
- {}; b(a.p.xmlReader.page, c).each(function(){a.p.page = this.textContent || this.text || 0}); b(a.p.xmlReader.total, c).each(function(){a.p.lastpage = this.textContent || this.text; if (a.p.lastpage === undefined)a.p.lastpage = 1}); b(a.p.xmlReader.records, c).each(function(){a.p.records = this.textContent || this.text || 0}); b(a.p.xmlReader.userdata, c).each(function(){a.p.userData[this.getAttribute("name")] = this.textContent || this.text}); c = b(a.p.xmlReader.root + " " + a.p.xmlReader.row, c); var ha = c.length, O = 0; if (c && ha){var ma = parseInt(a.p.rowNum,
- 10), wa = a.p.scroll?(parseInt(a.p.page, 10) - 1) * ma + 1:1; if (n)ma *= n + 1; for (n = b.isFunction(a.p.afterInsertRow); O < ha; ){E = c[O]; W = N(E, wa + O); p = e === 0?0:e + 1; p = (p + O) % 2 == 1?ga:""; B[S++] = '
'; if (a.p.rownumbers === true){B[S++] = la(0, O, a.p.page, a.p.rowNum); z = 1}if (a.p.multiselect === true){B[S++] = u(W, z, O); r = 1}if (a.p.subGrid === true){B[S++] = b(a).jqGrid("addSubGridCell", r + z, O + e); v = 1}if (a.p.xmlReader.repeatitems){P || (P = fa(r + v + z)); var za = b(a.p.xmlReader.cell,
- E); b.each(P, function(X){var V = za[this]; if (!V)return false; y = V.textContent || V.text; G[a.p.colModel[X + r + v + z].name] = y; B[S++] = R(W, y, X + r + v + z, O + e, E)})} else for (p = 0; p < L.length; p++){y = b(L[p], E).text(); G[a.p.colModel[p + r + v + z].name] = y; B[S++] = R(W, y, p + r + v + z, O + e, E)}B[S++] = "
"; if (a.p.gridview === false){if (a.p.treeGrid === true){p = a.p.treeANode >= - 1?a.p.treeANode:0; s = b(B.join(""))[0]; try{b(a).jqGrid("setTreeNode", G, s)} catch (Fa){}da === 0?b("tbody:first", d).append(s):b(a.rows[O + p + e]).after(s)} else b("tbody:first", d).append(B.join(""));
- if (a.p.subGrid === true)try{b(a).jqGrid("addSubGrid", a.rows[a.rows.length - 1], r + z)} catch (Ga){}n && a.p.afterInsertRow.call(a, W, G, E); B = []; S = 0}G = {}; w++; O++; if (w == ma)break}}a.p.gridview === true && b("tbody:first", d).append(B.join("")); a.p.totaltime = new Date - o; if (w > 0){a.grid.cols = a.rows[0].cells; if (a.p.records === 0)a.p.records = ha}B = null; if (!a.p.treeGrid && !a.p.scroll)a.grid.bDiv.scrollTop = 0; a.p.reccount = w; a.p.treeANode = - 1; a.p.userDataOnFooter && b(a).jqGrid("footerData", "set", a.p.userData, true); l || na(false, true)}},
- ra = function(c, d, e, l, n){var o = new Date; a.p.reccount = 0; if (c){if (a.p.treeANode === - 1 && !a.p.scroll){aa(d, false); e = 0} else e = e > 0?e:0; var p = 0, w, y, s, r = [], v, z = 0, D = 0, N = 0, L, P, G, da = {}, E, W = a.rows.length, B; s = []; E = 0; var S = a.p.altRows === true?" " + a.p.altclass:""; a.p.page = U(c, a.p.jsonReader.page) || 0; G = U(c, a.p.jsonReader.total); a.p.lastpage = G === undefined?1:G; a.p.records = U(c, a.p.jsonReader.records) || 0; a.p.userData = U(c, a.p.jsonReader.userdata) || {}; a.p.jsonReader.repeatitems || (v = r = ca("json")); G = a.p.keyIndex === false?a.p.jsonReader.id:
- a.p.keyIndex; if (r.length > 0 && !isNaN(G)){if (a.p.remapColumns && a.p.remapColumns.length)G = b.inArray(G, a.p.remapColumns); G = r[G]}if (P = U(c, a.p.jsonReader.root)){L = P.length; c = 0; var ga = parseInt(a.p.rowNum, 10), ha = a.p.scroll?(parseInt(a.p.page, 10) - 1) * ga + 1:1; if (n)ga *= n + 1; for (var O = b.isFunction(a.p.afterInsertRow); c < L; ){n = P[c]; B = U(n, G); if (B === undefined){B = ha + c; if (r.length === 0)if (a.p.jsonReader.cell)B = n[a.p.jsonReader.cell][G] || B}w = e === 0?0:e + 1; w = (w + c) % 2 == 1?S:""; s[E++] = '
'; if (a.p.rownumbers === true){s[E++] = la(0, c, a.p.page, a.p.rowNum); N = 1}if (a.p.multiselect){s[E++] = u(B, N, c); z = 1}if (a.p.subGrid){s[E++] = b(a).jqGrid("addSubGridCell", z + N, c + e); D = 1}if (a.p.jsonReader.repeatitems){if (a.p.jsonReader.cell)n = U(n, a.p.jsonReader.cell); v || (v = fa(z + D + N))}for (y = 0; y < v.length; y++){w = U(n, v[y]); s[E++] = R(B, w, y + z + D + N, c + e, n); da[a.p.colModel[y + z + D + N].name] = w}s[E++] = "
"; if (a.p.gridview === false){if (a.p.treeGrid === true){E = a.p.treeANode >= - 1?a.p.treeANode:0; s = b(s.join(""))[0];
- try{b(a).jqGrid("setTreeNode", da, s)} catch (ma){}W === 0?b("tbody:first", d).append(s):b(a.rows[c + E + e]).after(s)} else b("tbody:first", d).append(s.join("")); if (a.p.subGrid === true)try{b(a).jqGrid("addSubGrid", a.rows[a.rows.length - 1], z + N)} catch (wa){}O && a.p.afterInsertRow.call(a, B, da, n); s = []; E = 0}da = {}; p++; c++; if (p == ga)break}a.p.gridview === true && b("tbody:first", d).append(s.join("")); a.p.totaltime = new Date - o; if (p > 0){a.grid.cols = a.rows[0].cells; if (a.p.records === 0)a.p.records = L}}if (!a.p.treeGrid && !a.p.scroll)a.grid.bDiv.scrollTop =
- 0; a.p.reccount = p; a.p.treeANode = - 1; a.p.userDataOnFooter && b(a).jqGrid("footerData", "set", a.p.userData, true); l || na(false, true)}}, na = function(c, d){var e, l, n, o, p, w, y, s = ""; n = parseInt(a.p.page, 10) - 1; if (n < 0)n = 0; n *= parseInt(a.p.rowNum, 10); p = n + a.p.reccount; if (a.p.scroll){e = b("tbody:first > tr", a.grid.bDiv); n = p - e.length; if (l = e.outerHeight()){e = n * l; l = parseInt(a.p.records, 10) * l; b(">div:first", a.grid.bDiv).css({height:l}).children("div:first").css({height:e, display:e?"":"none"})}}s = a.p.pager?a.p.pager:""; s += a.p.toppager?
- s?"," + a.p.toppager:a.p.toppager:""; if (s){y = b.jgrid.formatter.integer || {}; if (a.p.loadonce){e = l = 1; a.p.lastpage = a.page = 1; b(".selbox", s).attr("disabled", true)} else{e = J(a.p.page); l = J(a.p.lastpage); b(".selbox", s).attr("disabled", false)}if (a.p.pginput === true){b(".ui-pg-input", s).val(a.p.page); b("#sp_1", s).html(b.fmatter?b.fmatter.util.NumberFormat(a.p.lastpage, y):a.p.lastpage)}if (a.p.viewrecords)if (a.p.reccount === 0)b(".ui-paging-info", s).html(a.p.emptyrecords); else{o = n + 1; w = a.p.records; if (b.fmatter){o = b.fmatter.util.NumberFormat(o,
- y); p = b.fmatter.util.NumberFormat(p, y); w = b.fmatter.util.NumberFormat(w, y)}b(".ui-paging-info", s).html(b.jgrid.format(a.p.recordtext, o, p, w))}if (a.p.pgbuttons === true){if (e <= 0)e = l = 0; if (e == 1 || e === 0){b("#first, #prev", a.p.pager).addClass("ui-state-disabled").removeClass("ui-state-hover"); a.p.toppager && b("#first_t, #prev_t", a.p.toppager).addClass("ui-state-disabled").removeClass("ui-state-hover")} else{b("#first, #prev", a.p.pager).removeClass("ui-state-disabled"); a.p.toppager && b("#first_t, #prev_t", a.p.toppager).removeClass("ui-state-disabled")}if (e ==
- l || e === 0){b("#next, #last", a.p.pager).addClass("ui-state-disabled").removeClass("ui-state-hover"); a.p.toppager && b("#next_t, #last_t", a.p.toppager).addClass("ui-state-disabled").removeClass("ui-state-hover")} else{b("#next, #last", a.p.pager).removeClass("ui-state-disabled"); a.p.toppager && b("#next_t, #last_t", a.p.toppager).removeClass("ui-state-disabled")}}}c === true && a.p.rownumbers === true && b("td.jqgrid-rownum", a.rows).each(function(r){b(this).html(n + 1 + r)}); d && a.p.jqgdnd && b(a).jqGrid("gridDnD", "updateDnD");
- b.isFunction(a.p.gridComplete) && a.p.gridComplete.call(a)}, Y = function(c){if (!a.grid.hDiv.loading){var d = a.p.scroll && c === false, e = {}, l, n = a.p.prmNames; if (a.p.page <= 0)a.p.page = 1; if (n.search !== null)e[n.search] = a.p.search; if (n.nd !== null)e[n.nd] = (new Date).getTime(); if (n.rows !== null)e[n.rows] = a.p.rowNum; if (n.page !== null)e[n.page] = a.p.page; if (n.sort !== null)e[n.sort] = a.p.sortname; if (n.order !== null)e[n.order] = a.p.sortorder; var o = a.p.loadComplete, p = b.isFunction(o); p || (o = null); var w = 0; c = c || 1; if (c > 1)if (n.npage !==
- null){e[n.npage] = c; w = c - 1; c = 1} else o = function(s){p && a.p.loadComplete.call(a, s); a.grid.hDiv.loading = false; a.p.page++; Y(c - 1)}; else n.npage !== null && delete a.p.postData[n.npage]; b.extend(a.p.postData, e); var y = !a.p.scroll?0:a.rows.length - 1; if (b.isFunction(a.p.datatype))a.p.datatype.call(a, a.p.postData, "load_" + a.p.id); else{b.isFunction(a.p.beforeRequest) && a.p.beforeRequest.call(a); l = a.p.datatype.toLowerCase(); switch (l){case "json":case "jsonp":case "xml":case "script":b.ajax(b.extend({url:a.p.url, type:a.p.mtype,
- dataType:l, data:b.isFunction(a.p.serializeGridData)?a.p.serializeGridData.call(a, a.p.postData):a.p.postData, success:function(s){l === "xml"?ia(s, a.grid.bDiv, y, c > 1, w):ra(s, a.grid.bDiv, y, c > 1, w); o && o.call(a, s); d && a.grid.populateVisible(); if (a.p.loadonce || a.p.treeGrid)a.p.datatype = "local"; ja()}, error:function(s, r, v){b.isFunction(a.p.loadError) && a.p.loadError.call(a, s, r, v); ja()}, beforeSend:function(s){oa(); b.isFunction(a.p.loadBeforeSend) && a.p.loadBeforeSend.call(a, s)}}, b.jgrid.ajaxOptions, a.p.ajaxGridOptions));
- break; case "xmlstring":oa(); e = b.jgrid.stringToDoc(a.p.datastr); p && a.p.loadComplete.call(a, e); ia(e, a.grid.bDiv); a.p.datatype = "local"; a.p.datastr = null; ja(); break; case "jsonstring":oa(); e = typeof a.p.datastr == "string"?b.jgrid.parse(a.p.datastr):a.p.datastr; p && a.p.loadComplete.call(a, e); ra(e, a.grid.bDiv); a.p.datatype = "local"; a.p.datastr = null; ja(); break; case "local":case "clientside":oa(); a.p.datatype = "local"; p && a.p.loadComplete.call(a, ""); Aa(); na(true, true); ja(); break}}}}, oa = function(){a.grid.hDiv.loading =
- true; if (!a.p.hiddengrid)switch (a.p.loadui){case "disable":break; case "enable":b("#load_" + a.p.id).show(); break; case "block":b("#lui_" + a.p.id).show(); b("#load_" + a.p.id).show(); break}}, ja = function(){a.grid.hDiv.loading = false; switch (a.p.loadui){case "disable":break; case "enable":b("#load_" + a.p.id).hide(); break; case "block":b("#lui_" + a.p.id).hide(); b("#load_" + a.p.id).hide(); break}}, Aa = function(){var c = /[\$,%]/g, d = [], e = 0, l, n, o, p = a.p.sortorder == "asc"?1: - 1, w = false, y; b.each(a.p.colModel, function(r){if (this.index ==
- a.p.sortname || this.name == a.p.sortname){if (a.p.lastsort == r)w = true; e = r; l = this.sorttype; return false}}); o = l == "float" || l == "number" || l == "currency"?function(r){r = parseFloat(r.replace(c, "")); return isNaN(r)?0:r}:l == "int" || l == "integer"?function(r){return J(r.replace(c, ""), 0)}:l == "date" || l == "datetime"?function(r){return Ba(a.p.colModel[e].datefmt || "Y-m-d", r).getTime()}:b.isFunction(l)?l:function(r){return b.trim(r.toUpperCase())}; y = a.p.colModel[e]; b.each(a.rows, function(r, v){try{n = b.unformat(b(v).children("td").eq(e),
- {rowId:v.id, colModel:y}, e, true)} catch (z){n = b(v).children("td").eq(e).text()}v.sortKey = o(n); d[r] = this}); if (a.p.treeGrid)b(a).jqGrid("SortTree", p); else{w?d.reverse():d.sort(function(r, v){if (r.sortKey < v.sortKey)return - p; if (r.sortKey > v.sortKey)return p; return 0}); if (d[0]){b("td", d[0]).each(function(r){b(this).css("width", g.headers[r].width + "px")}); a.grid.cols = d[0].cells}var s = ""; if (a.p.altRows)s = a.p.altclass; b.each(d, function(r, v){if (s)r % 2 == 1?b(v).addClass(s):b(v).removeClass(s); b("tbody", a.grid.bDiv).append(v);
- v.sortKey = null})}a.grid.bDiv.scrollTop = 0}, Ba = function(c, d){var e = {m:1, d:1, y:1970, h:0, i:0, s:0}, l, n, o; if (d = b.trim(d)){d = d.split(/[\\\/:_;.\t\T\s-]/); c = c.split(/[\\\/:_;.\t\T\s-]/); var p = b.jgrid.formatter.date.monthNames, w = b.jgrid.formatter.date.AmPm, y = function(s, r){if (s === 0){if (r == 12)r = 0} else if (r != 12)r += 12; return r}; l = 0; for (n = c.length; l < n; l++){if (c[l] == "M"){o = b.inArray(d[l], p); if (o !== - 1 && o < 12)d[l] = o + 1}if (c[l] == "F"){o = b.inArray(d[l], p); if (o !== - 1 && o > 11)d[l] = o + 1 - 12}if (c[l] == "a"){o = b.inArray(d[l], w); if (o !==
- - 1 && o < 2 && d[l] == w[o]){d[l] = o; e.h = y(d[l], e.h)}}if (c[l] == "A"){o = b.inArray(d[l], w); if (o !== - 1 && o > 1 && d[l] == w[o]){d[l] = o - 2; e.h = y(d[l], e.h)}}e[c[l].toLowerCase()] = parseInt(d[l], 10)}e.m = parseInt(e.m, 10) - 1; c = e.y; if (c >= 70 && c <= 99)e.y = 1900 + e.y; else if (c >= 0 && c <= 69)e.y = 2E3 + e.y}return new Date(e.y, e.m, e.d, e.h, e.i, e.s, 0)}; t = function(c, d){var e = "", l = "
", n = "", o, p, w, y, s = function(r){var v; if (b.isFunction(a.p.onPaging))v =
- a.p.onPaging.call(a, r); a.p.selrow = null; if (a.p.multiselect){a.p.selarrrow = []; b("#cb_" + b.jgrid.jqID(a.p.id), a.grid.hDiv).attr("checked", false)}a.p.savedRow = []; if (v == "stop")return false; return true}; c = c.substr(1); o = "pg_" + c; p = c + "_left"; w = c + "_center"; y = c + "_right"; b("#" + c).append("
").attr("dir", "ltr"); if (a.p.rowList.length > 0){n = "
"); K[0].rp = 0; a(L).append(K); o && o(a("#" + e)); K = (o = f.p.direction == "rtl"?true:false)?"nData":"pData"; var N = o?"pData":"nData"; z(d, f, L, y); K = ""; N = "";
- var Z = "" + b.bSubmit + "", $ = "" + b.bCancel + ""; K = "
"),
- j, m; if (f === 0){j = d; m = p.p.id; if (j == p.p.toppager){m += "_top"; H = 1}} else{j = p.p.toppager; m = p.p.id + "_top"}p.p.direction == "rtl" && a(e).attr("dir", "rtl").css("float", "right"); if (b.add){D = D || {}; l = a("
");
- var x = e.find("tr.sf"), G = x.find("td.fields"), y = x.find("td.ops"), o = x.find("td.data"), s = ""; jQuery.each(f.operators, function(){s += m(this.op, this.text)}); s = w("default", s, true); y.append(s); o.append(""); var t = "", z = false, p = false; jQuery.each(l, function(a){t += m(this.itemval, this.text); if (this.ops != null){z = true; var b = ""; jQuery.each(this.ops, function(){b += m(this.op, this.text)}); b = w("field" + a, b, true); y.append(b)}if (this.dataUrl != null){if (a > n)n = a; p = true;
- var d = this.dataEvents, c = this.dataInit, g = this.buildSelect; jQuery.ajax(jQuery.extend({url:this.dataUrl, complete:function(h){h = g != null?jQuery("").append(g(h)):jQuery("").append(h.responseText); h.find("select").addClass("field" + a).hide(); o.append(h.html()); c && E(".field" + a, c); d && F(".field" + a, d); a == n && e.find("tr.sf td.fields select[name='field']").change()}}, f.ajaxSelectOptions))} else if (this.dataValues != null){p = true; var i = ""; jQuery.each(this.dataValues, function(){i += m(this.value, this.text)});
- i = w("field" + a, i, true); o.append(i)} else if (this.dataEvents != null || this.dataInit != null){p = true; i = ""; o.append(i)}this.dataInit != null && a != n && E(".field" + a, this.dataInit); this.dataEvents != null && a != n && F(".field" + a, this.dataEvents)}); t = ""; G.append(t); l = G.find("select[name='field']"); z?l.change(function(a){var b = a.target.selectedIndex; a = jQuery(a.target).parents("tr.sf").find("td.ops"); a.find("select").removeAttr("name").hide(); b = a.find(".field" +
- b); if (b[0] == null)b = a.find(".default"); b.attr("name", "op").show()}):y.find(".default").attr("name", "op").show(); p?l.change(function(a){var b = a.target.selectedIndex; a = jQuery(a.target).parents("tr.sf").find("td.data"); a.find("select,input").removeClass("vdata").hide(); b = a.find(".field" + b); if (b[0] == null)b = a.find(".default"); b.show().addClass("vdata")}):o.find(".default").show().addClass("vdata"); if (z || p)l.change(); e.find(".ui-state-default").hover(C, C).mousedown(D).mouseup(D); e.find(".ui-closer").click(function(){f.onClose(jQuery(e.selector));
- return false}); e.find(".ui-del").click(function(a){a = jQuery(a.target).parents(".sf"); if (a.siblings(".sf").length > 0){f.datepickerFix === true && jQuery.fn.datepicker !== undefined && a.find(".hasDatepicker").datepicker("destroy"); a.remove()} else{a.find("select[name='field']")[0].selectedIndex = 0; a.find("select[name='op']")[0].selectedIndex = 0; a.find(".data input").val(""); a.find(".data select").each(function(){this.selectedIndex = 0}); a.find("select[name='field']").change()}return false}); e.find(".ui-add").click(function(a){a =
- jQuery(a.target).parents(".sf"); var b = a.clone(true).insertAfter(a); b.find(".ui-state-default").removeClass("ui-state-hover ui-state-active"); if (f.clone){b.find("select[name='field']")[0].selectedIndex = a.find("select[name='field']")[0].selectedIndex; if (b.find("select[name='op']")[0] != null)b.find("select[name='op']").focus()[0].selectedIndex = a.find("select[name='op']")[0].selectedIndex; var d = b.find("select.vdata"); if (d[0] != null)d[0].selectedIndex = a.find("select.vdata")[0].selectedIndex} else{b.find(".data input").val("");
- b.find("select[name='field']").focus()}f.datepickerFix === true && jQuery.fn.datepicker !== undefined && a.find(".hasDatepicker").each(function(){var c = jQuery.data(this, "datepicker").settings; b.find("#" + this.id).unbind().removeAttr("id").removeClass("hasDatepicker").datepicker(c)}); b.find("select[name='field']").change(); return false}); e.find(".ui-search").click(function(){var a = jQuery(e.selector), b, d = a.find("select[name='groupOp'] :selected").val(); b = f.stringResult?'{"groupOp":"' + d + '","rules":[':{groupOp:d,
- rules:[]}; a.find(".sf").each(function(c){var g = jQuery(this).find("select[name='field'] :selected").val(), i = jQuery(this).find("select[name='op'] :selected").val(), h = jQuery(this).find("input.vdata,select.vdata :selected").val(); h += ""; h = h.replace(/\\/g, "\\\\").replace(/\"/g, '\\"'); if (f.stringResult){if (c > 0)b += ","; b += '{"field":"' + g + '",'; b += '"op":"' + i + '",'; b += '"data":"' + h + '"}'} else b.rules.push({field:g, op:i, data:h})}); if (f.stringResult)b += "]}"; f.onSearch(b); return false}); e.find(".ui-reset").click(function(){var a =
- jQuery(e.selector); a.find(".ui-del").click(); a.find("select[name='groupOp']")[0].selectedIndex = 0; f.onReset(); return false}); e.find(".ui-add-last").click(function(){var a = jQuery(e.selector + " .sf:last"), b = a.clone(true).insertAfter(a); b.find(".ui-state-default").removeClass("ui-state-hover ui-state-active"); b.find(".data input").val(""); b.find("select[name='field']").focus(); f.datepickerFix === true && jQuery.fn.datepicker !== undefined && a.find(".hasDatepicker").each(function(){var d = jQuery.data(this, "datepicker").settings;
- b.find("#" + this.id).unbind().removeAttr("id").removeClass("hasDatepicker").datepicker(d)}); b.find("select[name='field']").change(); return false}); this.setGroupOp = function(a){selDOMobj = this.$.find("select[name='groupOp']")[0]; var b = {}, d = selDOMobj.options.length, c; for (c = 0; c < d; c++)b[selDOMobj.options[c].value] = c; selDOMobj.selectedIndex = b[a]; $(selDOMobj).change()}; this.setFilter = function(a){var b = a.sfref; a = a.filter; var d = [], c, g, i, h, j = {}; selDOMobj = b.find("select[name='field']")[0]; c = 0; for (i = selDOMobj.options.length; c <
- i; c++){j[selDOMobj.options[c].value] = {index:c, ops:{}}; d.push(selDOMobj.options[c].value)}c = 0; for (i = d.length; c < i; c++){if (selDOMobj = b.find(".ops > select[class='field" + c + "']")[0]){g = 0; for (h = selDOMobj.options.length; g < h; g++)j[d[c]].ops[selDOMobj.options[g].value] = g}if (selDOMobj = b.find(".data > select[class='field" + c + "']")[0]){j[d[c]].data = {}; g = 0; for (h = selDOMobj.options.length; g < h; g++)j[d[c]].data[selDOMobj.options[g].value] = g}}var u, q, A, B; d = a.field; if (j[d])u = j[d].index; if (u != null){q = j[d].ops[a.op]; if (q ===
- undefined){c = 0; for (i = v.operators.length; c < i; c++)if (v.operators[c].op == a.op){q = c; break}}A = a.data; B = j[d].data == null? - 1:j[d].data[A]}if (u != null && q != null && B != null){b.find("select[name='field']")[0].selectedIndex = u; b.find("select[name='field']").change(); b.find("select[name='op']")[0].selectedIndex = q; b.find("input.vdata").val(A); if (b = b.find("select.vdata")[0])b.selectedIndex = B; return true} else return false}}}return new I(this, k, H)}; jQuery.fn.searchFilter.version = "1.2.9";
- jQuery.fn.searchFilter.defaults = {clone:true, datepickerFix:true, onReset:function(k){alert("Reset Clicked. Data Returned: " + k)}, onSearch:function(k){alert("Search Clicked. Data Returned: " + k)}, onClose:function(k){k.hide()}, groupOps:[{op:"AND", text:"all"}, {op:"OR", text:"any"}], operators:[{op:"eq", text:"is equal to"}, {op:"ne", text:"is not equal to"}, {op:"lt", text:"is less than"}, {op:"le", text:"is less or equal to"}, {op:"gt", text:"is greater than"}, {op:"ge", text:"is greater or equal to"}, {op:"in", text:"is in"},
- {op:"ni", text:"is not in"}, {op:"bw", text:"begins with"}, {op:"bn", text:"does not begin with"}, {op:"ew", text:"ends with"}, {op:"en", text:"does not end with"}, {op:"cn", text:"contains"}, {op:"nc", text:"does not contain"}], matchText:"match", rulesText:"rules", resetText:"Reset", searchText:"Search", stringResult:true, windowTitle:"Search Rules", ajaxSelectOptions:{}};
- (function(a){a.jgrid.extend({editRow:function(d, t, i, n, o, u, s, c, f){return this.each(function(){var b = this, k, l, r = 0, p = null, q = {}, h, g; if (b.grid){h = a(b).jqGrid("getInd", d, true); if (h !== false)if ((a(h).attr("editable") || "0") == "0" && !a(h).hasClass("not-editable-row")){g = b.p.colModel; a("td", h).each(function(j){k = g[j].name; var v = b.p.treeGrid === true && k == b.p.ExpandColumn; if (v)l = a("span:first", this).html(); else try{l = a.unformat(this, {rowId:d, colModel:g[j]}, j)} catch (m){l = a(this).html()}if (k != "cb" && k != "subgrid" && k !=
- "rn"){if (b.p.autoencode)l = a.jgrid.htmlDecode(l); q[k] = l; if (g[j].editable === true){if (p === null)p = j; v?a("span:first", this).html(""):a(this).html(""); var e = a.extend({}, g[j].editoptions || {}, {id:d + "_" + k, name:k}); if (!g[j].edittype)g[j].edittype = "text"; e = createEl(g[j].edittype, e, l, true, a.extend({}, a.jgrid.ajaxOptions, b.p.ajaxSelectOptions || {})); a(e).addClass("editable"); v?a("span:first", this).append(e):a(this).append(e); g[j].edittype == "select" && g[j].editoptions.multiple === true && a.browser.msie && a(e).width(a(e).width());
- r++}}}); if (r > 0){q.id = d; b.p.savedRow.push(q); a(h).attr("editable", "1"); a("td:eq(" + p + ") input", h).focus(); t === true && a(h).bind("keydown", function(j){j.keyCode === 27 && a(b).jqGrid("restoreRow", d, f); if (j.keyCode === 13){if (j.target.tagName == "TEXTAREA")return true; a(b).jqGrid("saveRow", d, n, o, u, s, c, f); return false}j.stopPropagation()}); a.isFunction(i) && i(d)}}}})}, saveRow:function(d, t, i, n, o, u, s){return this.each(function(){var c = this, f, b = {}, k = {}, l, r, p, q; if (c.grid){q = a(c).jqGrid("getInd", d, true); if (q !== false){l =
- a(q).attr("editable"); i = i?i:c.p.editurl; if (l === "1"){var h; a("td", q).each(function(m){h = c.p.colModel[m]; f = h.name; if (f != "cb" && f != "subgrid" && h.editable === true && f != "rn"){switch (h.edittype){case "checkbox":var e = ["Yes", "No"]; if (h.editoptions)e = h.editoptions.value.split(":"); b[f] = a("input", this).attr("checked")?e[0]:e[1]; break; case "text":case "password":case "textarea":case "button":b[f] = a("input, textarea", this).val(); break; case "select":if (h.editoptions.multiple){e = a("select", this); var x = []; b[f] = a(e).val();
- b[f] = b[f]?b[f].join(","):""; a("select > option:selected", this).each(function(y, z){x[y] = a(z).text()}); k[f] = x.join(",")} else{b[f] = a("select>option:selected", this).val(); k[f] = a("select>option:selected", this).text()}if (h.formatter && h.formatter == "select")k = {}; break; case "custom":try{if (h.editoptions && a.isFunction(h.editoptions.custom_value)){b[f] = h.editoptions.custom_value(a(".customelement", this), "get"); if (b[f] === undefined)throw"e2"; } else throw"e1"; } catch (w){w == "e1" && info_dialog(jQuery.jgrid.errors.errcap,
- "function 'custom_value' " + a.jgrid.edit.msg.nodefined, jQuery.jgrid.edit.bClose); w == "e2"?info_dialog(jQuery.jgrid.errors.errcap, "function 'custom_value' " + a.jgrid.edit.msg.novalue, jQuery.jgrid.edit.bClose):info_dialog(jQuery.jgrid.errors.errcap, w.message, jQuery.jgrid.edit.bClose)}break}p = checkValues(b[f], m, c); if (p[0] === false){p[1] = b[f] + " " + p[1]; return false}if (c.p.autoencode)b[f] = a.jgrid.htmlEncode(b[f])}}); if (p[0] === false)try{var g = findPos(a("#" + d)[0]); info_dialog(a.jgrid.errors.errcap, p[1], a.jgrid.edit.bClose,
- {left:g[0], top:g[1]})} catch (j){alert(p[1])} else{if (b){var v; g = c.p.prmNames; v = g.oper; l = g.id; b[v] = g.editoper; b[l] = d; if (typeof c.p.inlineData == "undefined")c.p.inlineData = {}; if (typeof n == "undefined")n = {}; b = a.extend({}, b, c.p.inlineData, n)}if (i == "clientArray"){b = a.extend({}, b, k); c.p.autoencode && a.each(b, function(m, e){b[m] = a.jgrid.htmlDecode(e)}); l = a(c).jqGrid("setRowData", d, b); a(q).attr("editable", "0"); for (g = 0; g < c.p.savedRow.length; g++)if (c.p.savedRow[g].id == d){r = g; break}r >= 0 && c.p.savedRow.splice(r, 1);
- a.isFunction(o) && o(d, l)} else{a("#lui_" + c.p.id).show(); a.ajax(a.extend({url:i, data:a.isFunction(c.p.serializeRowData)?c.p.serializeRowData(b):b, type:"POST", complete:function(m, e){a("#lui_" + c.p.id).hide(); if (e === "success")if ((a.isFunction(t)?t(m):true) === true){c.p.autoencode && a.each(b, function(x, w){b[x] = a.jgrid.htmlDecode(w)}); b = a.extend({}, b, k); a(c).jqGrid("setRowData", d, b); a(q).attr("editable", "0"); for (e = 0; e < c.p.savedRow.length; e++)if (c.p.savedRow[e].id == d){r = e; break}r >= 0 && c.p.savedRow.splice(r, 1);
- a.isFunction(o) && o(d, m)} else a(c).jqGrid("restoreRow", d, s)}, error:function(m, e){a("#lui_" + c.p.id).hide(); a.isFunction(u)?u(d, m, e):alert("Error Row: " + d + " Result: " + m.status + ":" + m.statusText + " Status: " + e)}}, a.jgrid.ajaxOptions, c.p.ajaxRowOptions || {}))}a(q).unbind("keydown")}}}}})}, restoreRow:function(d, t){return this.each(function(){var i = this, n, o, u = {}; if (i.grid){o = a(i).jqGrid("getInd", d, true); if (o !== false){for (var s = 0; s < i.p.savedRow.length; s++)if (i.p.savedRow[s].id == d){n = s; break}if (n >= 0){if (a.isFunction(a.fn.datepicker))try{a("input.hasDatepicker",
- "#" + o.id).datepicker("hide")} catch (c){}a.each(i.p.colModel, function(){if (this.editable === true && this.name in i.p.savedRow[n])u[this.name] = i.p.savedRow[n][this.name]}); a(i).jqGrid("setRowData", d, u); a(o).attr("editable", "0").unbind("keydown"); i.p.savedRow.splice(n, 1)}a.isFunction(t) && t(d)}}})}})})(jQuery);
- (function(b){b.jgrid.extend({editCell:function(d, e, a){return this.each(function(){var c = this, h, f, g; if (!(!c.grid || c.p.cellEdit !== true)){e = parseInt(e, 10); c.p.selrow = c.rows[d].id; c.p.knv || b(c).jqGrid("GridNav"); if (c.p.savedRow.length > 0){if (a === true)if (d == c.p.iRow && e == c.p.iCol)return; b(c).jqGrid("saveCell", c.p.savedRow[0].id, c.p.savedRow[0].ic)} else window.setTimeout(function(){b("#" + c.p.knv).attr("tabindex", "-1").focus()}, 0); h = c.p.colModel[e].name; if (!(h == "subgrid" || h == "cb" || h == "rn")){g = b("td:eq(" + e +
- ")", c.rows[d]); if (c.p.colModel[e].editable === true && a === true && !g.hasClass("not-editable-cell")){if (parseInt(c.p.iCol, 10) >= 0 && parseInt(c.p.iRow, 10) >= 0){b("td:eq(" + c.p.iCol + ")", c.rows[c.p.iRow]).removeClass("edit-cell ui-state-highlight"); b(c.rows[c.p.iRow]).removeClass("selected-row ui-state-hover")}b(g).addClass("edit-cell ui-state-highlight"); b(c.rows[d]).addClass("selected-row ui-state-hover"); try{f = b.unformat(g, {rowId:c.rows[d].id, colModel:c.p.colModel[e]}, e)} catch (k){f = b(g).html()}if (c.p.autoencode)f =
- b.jgrid.htmlDecode(f); if (!c.p.colModel[e].edittype)c.p.colModel[e].edittype = "text"; c.p.savedRow.push({id:d, ic:e, name:h, v:f}); if (b.isFunction(c.p.formatCell)){var j = c.p.formatCell(c.rows[d].id, h, f, d, e); if (j !== undefined)f = j}j = b.extend({}, c.p.colModel[e].editoptions || {}, {id:d + "_" + h, name:h}); var i = createEl(c.p.colModel[e].edittype, j, f, true, b.extend({}, b.jgrid.ajaxOptions, c.p.ajaxSelectOptions || {})); b.isFunction(c.p.beforeEditCell) && c.p.beforeEditCell(c.rows[d].id, h, f, d, e); b(g).html("").append(i).attr("tabindex",
- "0"); window.setTimeout(function(){b(i).focus()}, 0); b("input, select, textarea", g).bind("keydown", function(l){if (l.keyCode === 27)if (b("input.hasDatepicker", g).length > 0)b(".ui-datepicker").is(":hidden")?b(c).jqGrid("restoreCell", d, e):b("input.hasDatepicker", g).datepicker("hide"); else b(c).jqGrid("restoreCell", d, e); l.keyCode === 13 && b(c).jqGrid("saveCell", d, e); if (l.keyCode == 9)if (c.grid.hDiv.loading)return false; else l.shiftKey?b(c).jqGrid("prevCell", d, e):b(c).jqGrid("nextCell", d, e); l.stopPropagation()});
- b.isFunction(c.p.afterEditCell) && c.p.afterEditCell(c.rows[d].id, h, f, d, e)} else{if (parseInt(c.p.iCol, 10) >= 0 && parseInt(c.p.iRow, 10) >= 0){b("td:eq(" + c.p.iCol + ")", c.rows[c.p.iRow]).removeClass("edit-cell ui-state-highlight"); b(c.rows[c.p.iRow]).removeClass("selected-row ui-state-hover")}g.addClass("edit-cell ui-state-highlight"); b(c.rows[d]).addClass("selected-row ui-state-hover"); if (b.isFunction(c.p.onSelectCell)){f = g.html().replace(/\ \;/ig, ""); c.p.onSelectCell(c.rows[d].id, h, f, d, e)}}c.p.iCol = e; c.p.iRow =
- d}}})}, saveCell:function(d, e){return this.each(function(){var a = this, c; if (!(!a.grid || a.p.cellEdit !== true)){c = a.p.savedRow.length >= 1?0:null; if (c !== null){var h = b("td:eq(" + e + ")", a.rows[d]), f, g, k = a.p.colModel[e], j = k.name, i = b.jgrid.jqID(j); switch (k.edittype){case "select":if (k.editoptions.multiple){i = b("#" + d + "_" + i, a.rows[d]); var l = []; if (f = b(i).val())f.join(","); else f = ""; b("option:selected", i).each(function(m, p){l[m] = b(p).text()}); g = l.join(",")} else{f = b("#" + d + "_" + i + ">option:selected", a.rows[d]).val();
- g = b("#" + d + "_" + i + ">option:selected", a.rows[d]).text()}if (k.formatter)g = f; break; case "checkbox":var n = ["Yes", "No"]; if (k.editoptions)n = k.editoptions.value.split(":"); g = f = b("#" + d + "_" + i, a.rows[d]).attr("checked")?n[0]:n[1]; break; case "password":case "text":case "textarea":case "button":g = f = b("#" + d + "_" + i, a.rows[d]).val(); break; case "custom":try{if (k.editoptions && b.isFunction(k.editoptions.custom_value)){f = k.editoptions.custom_value(b(".customelement", h), "get"); if (f === undefined)throw"e2"; else g = f} else throw"e1";
- } catch (q){q == "e1" && info_dialog(jQuery.jgrid.errors.errcap, "function 'custom_value' " + b.jgrid.edit.msg.nodefined, jQuery.jgrid.edit.bClose); q == "e2"?info_dialog(jQuery.jgrid.errors.errcap, "function 'custom_value' " + b.jgrid.edit.msg.novalue, jQuery.jgrid.edit.bClose):info_dialog(jQuery.jgrid.errors.errcap, q.message, jQuery.jgrid.edit.bClose)}break}if (g != a.p.savedRow[c].v){if (b.isFunction(a.p.beforeSaveCell))if (c = a.p.beforeSaveCell(a.rows[d].id, j, f, d, e))f = c; var r = checkValues(f, e, a); if (r[0] === true){c = {};
- if (b.isFunction(a.p.beforeSubmitCell))(c = a.p.beforeSubmitCell(a.rows[d].id, j, f, d, e)) || (c = {}); b("input.hasDatepicker", h).length > 0 && b("input.hasDatepicker", h).datepicker("hide"); if (a.p.cellsubmit == "remote")if (a.p.cellurl){var o = {}; if (a.p.autoencode)f = b.jgrid.htmlEncode(f); o[j] = f; n = a.p.prmNames; k = n.id; i = n.oper; o[k] = a.rows[d].id; o[i] = n.editoper; o = b.extend(c, o); b("#lui_" + a.p.id).show(); a.grid.hDiv.loading = true; b.ajax(b.extend({url:a.p.cellurl, data:b.isFunction(a.p.serializeCellData)?a.p.serializeCellData(o):
- o, type:"POST", complete:function(m, p){b("#lui_" + a.p.id).hide(); a.grid.hDiv.loading = false; if (p == "success")if (b.isFunction(a.p.afterSubmitCell)){m = a.p.afterSubmitCell(m, o.id, j, f, d, e); if (m[0] === true){b(h).empty(); b(a).jqGrid("setCell", a.rows[d].id, e, g, false, false, true); b(h).addClass("dirty-cell"); b(a.rows[d]).addClass("edited"); b.isFunction(a.p.afterSaveCell) && a.p.afterSaveCell(a.rows[d].id, j, f, d, e); a.p.savedRow.splice(0, 1)} else{info_dialog(b.jgrid.errors.errcap, m[1], b.jgrid.edit.bClose); b(a).jqGrid("restoreCell",
- d, e)}} else{b(h).empty(); b(a).jqGrid("setCell", a.rows[d].id, e, g, false, false, true); b(h).addClass("dirty-cell"); b(a.rows[d]).addClass("edited"); b.isFunction(a.p.afterSaveCell) && a.p.afterSaveCell(a.rows[d].id, j, f, d, e); a.p.savedRow.splice(0, 1)}}, error:function(m, p){b("#lui_" + a.p.id).hide(); a.grid.hDiv.loading = false; b.isFunction(a.p.errorCell)?a.p.errorCell(m, p):info_dialog(b.jgrid.errors.errcap, m.status + " : " + m.statusText + " " + p, b.jgrid.edit.bClose); b(a).jqGrid("restoreCell", d, e)}}, b.jgrid.ajaxOptions,
- a.p.ajaxCellOptions || {}))} else try{info_dialog(b.jgrid.errors.errcap, b.jgrid.errors.nourl, b.jgrid.edit.bClose); b(a).jqGrid("restoreCell", d, e)} catch (s){}if (a.p.cellsubmit == "clientArray"){b(h).empty(); b(a).jqGrid("setCell", a.rows[d].id, e, g, false, false, true); b(h).addClass("dirty-cell"); b(a.rows[d]).addClass("edited"); b.isFunction(a.p.afterSaveCell) && a.p.afterSaveCell(a.rows[d].id, j, f, d, e); a.p.savedRow.splice(0, 1)}} else try{window.setTimeout(function(){info_dialog(b.jgrid.errors.errcap, f + " " + r[1], b.jgrid.edit.bClose)},
- 100); b(a).jqGrid("restoreCell", d, e)} catch (t){}} else b(a).jqGrid("restoreCell", d, e)}b.browser.opera?b("#" + a.p.knv).attr("tabindex", "-1").focus():window.setTimeout(function(){b("#" + a.p.knv).attr("tabindex", "-1").focus()}, 0)}})}, restoreCell:function(d, e){return this.each(function(){var a = this, c; if (!(!a.grid || a.p.cellEdit !== true)){c = a.p.savedRow.length >= 1?0:null; if (c !== null){var h = b("td:eq(" + e + ")", a.rows[d]); if (b.isFunction(b.fn.datepicker))try{b("input.hasDatepicker", h).datepicker("hide")} catch (f){}b(h).empty().attr("tabindex",
- "-1"); b(a).jqGrid("setCell", a.rows[d].id, e, a.p.savedRow[c].v, false, false, true); a.p.savedRow.splice(0, 1)}window.setTimeout(function(){b("#" + a.p.knv).attr("tabindex", "-1").focus()}, 0)}})}, nextCell:function(d, e){return this.each(function(){var a = this, c = false; if (!(!a.grid || a.p.cellEdit !== true)){for (var h = e + 1; h < a.p.colModel.length; h++)if (a.p.colModel[h].editable === true){c = h; break}if (c !== false)b(a).jqGrid("editCell", d, c, true); else a.p.savedRow.length > 0 && b(a).jqGrid("saveCell", d, e)}})}, prevCell:function(d,
- e){return this.each(function(){var a = this, c = false; if (!(!a.grid || a.p.cellEdit !== true)){for (var h = e - 1; h >= 0; h--)if (a.p.colModel[h].editable === true){c = h; break}if (c !== false)b(a).jqGrid("editCell", d, c, true); else a.p.savedRow.length > 0 && b(a).jqGrid("saveCell", d, e)}})}, GridNav:function(){return this.each(function(){function d(g, k, j){if (j.substr(0, 1) == "v"){var i = b(a.grid.bDiv)[0].clientHeight, l = b(a.grid.bDiv)[0].scrollTop, n = a.rows[g].offsetTop + a.rows[g].clientHeight, q = a.rows[g].offsetTop; if (j == "vd")if (n >= i)b(a.grid.bDiv)[0].scrollTop =
- b(a.grid.bDiv)[0].scrollTop + a.rows[g].clientHeight; if (j == "vu")if (q < l)b(a.grid.bDiv)[0].scrollTop = b(a.grid.bDiv)[0].scrollTop - a.rows[g].clientHeight}if (j == "h"){j = b(a.grid.bDiv)[0].clientWidth; i = b(a.grid.bDiv)[0].scrollLeft; l = a.rows[g].cells[k].offsetLeft; if (a.rows[g].cells[k].offsetLeft + a.rows[g].cells[k].clientWidth >= j + parseInt(i, 10))b(a.grid.bDiv)[0].scrollLeft = b(a.grid.bDiv)[0].scrollLeft + a.rows[g].cells[k].clientWidth; else if (l < i)b(a.grid.bDiv)[0].scrollLeft = b(a.grid.bDiv)[0].scrollLeft - a.rows[g].cells[k].clientWidth}}
- function e(g, k){var j, i; if (k == "lft"){j = g + 1; for (i = g; i >= 0; i--)if (a.p.colModel[i].hidden !== true){j = i; break}}if (k == "rgt"){j = g - 1; for (i = g; i < a.p.colModel.length; i++)if (a.p.colModel[i].hidden !== true){j = i; break}}return j}var a = this; if (!(!a.grid || a.p.cellEdit !== true)){a.p.knv = a.p.id + "_kn"; var c = b(""), h, f; b(c).insertBefore(a.grid.cDiv);
- b("#" + a.p.knv).focus().keydown(function(g){f = g.keyCode; if (a.p.direction == "rtl")if (f == 37)f = 39; else if (f == 39)f = 37; switch (f){case 38:if (a.p.iRow - 1 >= 0){d(a.p.iRow - 1, a.p.iCol, "vu"); b(a).jqGrid("editCell", a.p.iRow - 1, a.p.iCol, false)}break; case 40:if (a.p.iRow + 1 <= a.rows.length - 1){d(a.p.iRow + 1, a.p.iCol, "vd"); b(a).jqGrid("editCell", a.p.iRow + 1, a.p.iCol, false)}break; case 37:if (a.p.iCol - 1 >= 0){h = e(a.p.iCol - 1, "lft"); d(a.p.iRow, h, "h"); b(a).jqGrid("editCell", a.p.iRow, h, false)}break; case 39:if (a.p.iCol + 1 <= a.p.colModel.length -
- 1){h = e(a.p.iCol + 1, "rgt"); d(a.p.iRow, h, "h"); b(a).jqGrid("editCell", a.p.iRow, h, false)}break; case 13:parseInt(a.p.iCol, 10) >= 0 && parseInt(a.p.iRow, 10) >= 0 && b(a).jqGrid("editCell", a.p.iRow, a.p.iCol, true); break}return false})}})}, getChangedCells:function(d){var e = []; d || (d = "all"); this.each(function(){var a = this, c; !a.grid || a.p.cellEdit !== true || b(a.rows).each(function(h){var f = {}; if (b(this).hasClass("edited")){b("td", this).each(function(g){c = a.p.colModel[g].name; if (c !== "cb" && c !== "subgrid")if (d == "dirty"){if (b(this).hasClass("dirty-cell"))try{f[c] =
- b.unformat(this, {rowId:a.rows[h].id, colModel:a.p.colModel[g]}, g)} catch (k){f[c] = b.jgrid.htmlDecode(b(this).html())}} else try{f[c] = b.unformat(this, {rowId:a.rows[h].id, colModel:a.p.colModel[g]}, g)} catch (j){f[c] = b.jgrid.htmlDecode(b(this).html())}}); f.id = this.id; e.push(f)}})}); return e}})})(jQuery);
- (function(b){b.fn.jqm = function(a){var f = {overlay:50, closeoverlay:true, overlayClass:"jqmOverlay", closeClass:"jqmClose", trigger:".jqModal", ajax:e, ajaxText:"", target:e, modal:e, toTop:e, onShow:e, onHide:e, onLoad:e}; return this.each(function(){if (this._jqm)return i[this._jqm].c = b.extend({}, i[this._jqm].c, a); l++; this._jqm = l; i[l] = {c:b.extend(f, b.jqm.params, a), a:e, w:b(this).addClass("jqmID" + l), s:l}; f.trigger && b(this).jqmAddTrigger(f.trigger)})}; b.fn.jqmAddClose = function(a){return o(this, a, "jqmHide")}; b.fn.jqmAddTrigger =
- function(a){return o(this, a, "jqmShow")}; b.fn.jqmShow = function(a){return this.each(function(){b.jqm.open(this._jqm, a)})}; b.fn.jqmHide = function(a){return this.each(function(){b.jqm.close(this._jqm, a)})}; b.jqm = {hash:{}, open:function(a, f){var c = i[a], d = c.c, h = "." + d.closeClass, g = parseInt(c.w.css("z-index")); g = g > 0?g:3E3; var j = b("").css({height:"100%", width:"100%", position:"fixed", left:0, top:0, "z-index":g - 1, opacity:d.overlay / 100}); if (c.a)return e; c.t = f; c.a = true; c.w.css("z-index", g); if (d.modal){k[0] ||
- setTimeout(function(){p("bind")}, 1); k.push(a)} else if (d.overlay > 0)d.closeoverlay && c.w.jqmAddClose(j); else j = e; c.o = j?j.addClass(d.overlayClass).prependTo("body"):e; if (q){b("html,body").css({height:"100%", width:"100%"}); if (j){j = j.css({position:"absolute"})[0]; for (var m in{Top:1, Left:1})j.style.setExpression(m.toLowerCase(), "(_=(document.documentElement.scroll" + m + " || document.body.scroll" + m + "))+'px'")}}if (d.ajax){a = d.target || c.w; g = d.ajax; a = typeof a == "string"?b(a, c.w):b(a); g = g.substr(0, 1) == "@"?b(f).attr(g.substring(1)):
- g; a.html(d.ajaxText).load(g, function(){d.onLoad && d.onLoad.call(this, c); h && c.w.jqmAddClose(b(h, c.w)); r(c)})} else h && c.w.jqmAddClose(b(h, c.w)); d.toTop && c.o && c.w.before('').insertAfter(c.o); d.onShow?d.onShow(c):c.w.show(); r(c); return e}, close:function(a){a = i[a]; if (!a.a)return e; a.a = e; if (k[0]){k.pop(); k[0] || p("unbind")}a.c.toTop && a.o && b("#jqmP" + a.w[0]._jqm).after(a.w).remove(); if (a.c.onHide)a.c.onHide(a); else{a.w.hide(); a.o && a.o.remove()}return e}, params:{}}; var l =
- 0, i = b.jqm.hash, k = [], q = b.browser.msie && b.browser.version == "6.0", e = false, r = function(a){var f = b('').css({opacity:0}); if (q)if (a.o)a.o.html('').prepend(f); else b("iframe.jqm", a.w)[0] || a.w.prepend(f); s(a)}, s = function(a){try{b(":input:visible", a.w)[0].focus()} catch (f){}}, p = function(a){b(document)[a]("keypress", n)[a]("keydown", n)[a]("mousedown", n)}, n = function(a){var f = i[k[k.length - 1]]; (a = !b(a.target).parents(".jqmID" +
- f.s)[0]) && s(f); return!a}, o = function(a, f, c){return a.each(function(){var d = this._jqm; b(f).each(function(){if (!this[c]){this[c] = []; b(this).click(function(){for (var h in{jqmShow:1, jqmHide:1})for (var g in this[h])i[this[h][g]] && i[this[h][g]].w[h](this); return e})}this[c].push(d)})})}})(jQuery);
- (function(b){b.fn.jqDrag = function(a){return l(this, a, "d")}; b.fn.jqResize = function(a, e){return l(this, a, "r", e)}; b.jqDnR = {dnr:{}, e:0, drag:function(a){if (c.k == "d")d.css({left:c.X + a.pageX - c.pX, top:c.Y + a.pageY - c.pY}); else{d.css({width:Math.max(a.pageX - c.pX + c.W, 0), height:Math.max(a.pageY - c.pY + c.H, 0)}); M1 && f.css({width:Math.max(a.pageX - M1.pX + M1.W, 0), height:Math.max(a.pageY - M1.pY + M1.H, 0)})}return false}, stop:function(){b(document).unbind("mousemove", i.drag).unbind("mouseup", i.stop)}}; var i = b.jqDnR, c = i.dnr,
- d = i.e, f, l = function(a, e, n, m){return a.each(function(){e = e?b(e, a):a; e.bind("mousedown", {e:a, k:n}, function(g){var j = g.data, h = {}; d = j.e; f = m?b(m):false; if (d.css("position") != "relative")try{d.position(h)} catch (o){}c = {X:h.left || k("left") || 0, Y:h.top || k("top") || 0, W:k("width") || d[0].scrollWidth || 0, H:k("height") || d[0].scrollHeight || 0, pX:g.pageX, pY:g.pageY, k:j.k}; M1 = f && j.k != "d"?{X:h.left || f1("left") || 0, Y:h.top || f1("top") || 0, W:f[0].offsetWidth || f1("width") || 0, H:f[0].offsetHeight || f1("height") || 0, pX:g.pageX, pY:g.pageY,
- k:j.k}:false; b(document).mousemove(b.jqDnR.drag).mouseup(b.jqDnR.stop); return false})})}, k = function(a){return parseInt(d.css(a)) || false}; f1 = function(a){return parseInt(f.css(a)) || false}})(jQuery);
- (function(a){a.jgrid.extend({setSubGrid:function(){return this.each(function(){var e = this; e.p.colNames.unshift(""); e.p.colModel.unshift({name:"subgrid", width:a.browser.safari?e.p.subGridWidth + e.p.cellLayout:e.p.subGridWidth, sortable:false, resizable:false, hidedlg:true, search:false, fixed:true}); e = e.p.subGridModel; if (e[0]){e[0].align = a.extend([], e[0].align || []); for (var c = 0; c < e[0].name.length; c++)e[0].align[c] = e[0].align[c] || "left"}})}, addSubGridCell:function(e, c){var b = "", n, k; this.each(function(){b =
- this.formatCol(e, c); n = this.p.gridview; k = this.p.id}); return n === false?'
":'
"}, addSubGrid:function(e, c){return this.each(function(){var b = this; if (b.grid){var n, k, p, t, s, u, o; a("td:eq(" + c + ")", e).click(function(){if (a(this).hasClass("sgcollapsed")){p = b.p.id; n = a(this).parent();
- t = c >= 1?"
":""; k = a(n).attr("id"); o = true; if (a.isFunction(b.p.subGridBeforeExpand))o = b.p.subGridBeforeExpand(p + "_" + k, k); if (o === false)return false; s = 0; a.each(b.p.colModel, function(){if (this.hidden === true || this.name == "rn" || this.name == "cb")s++}); u = "
" + t + "
"; a(this).parent().after(u + "
"); a.isFunction(b.p.subGridRowExpanded)?b.p.subGridRowExpanded(p + "_" + k, k):x(n); a(this).html("").removeClass("sgcollapsed").addClass("sgexpanded")} else if (a(this).hasClass("sgexpanded")){o = true; if (a.isFunction(b.p.subGridRowColapsed)){n = a(this).parent(); k = a(n).attr("id"); o = b.p.subGridRowColapsed(p + "_" + k, k)}if (o === false)return false; a(this).parent().next().remove(".ui-subgrid");
- a(this).html("").removeClass("sgexpanded").addClass("sgcollapsed")}return false}); var x = function(g){var j, f, d, h; j = a(g).attr("id"); f = {nd_:(new Date).getTime()}; f[b.p.prmNames.subgridid] = j; if (!b.p.subGridModel[0])return false; if (b.p.subGridModel[0].params)for (h = 0; h < b.p.subGridModel[0].params.length; h++)for (d = 0; d < b.p.colModel.length; d++)if (b.p.colModel[d].name == b.p.subGridModel[0].params[h])f[b.p.colModel[d].name] = a("td:eq(" +
- d + ")", g).text().replace(/\ \;/ig, ""); if (!b.grid.hDiv.loading){b.grid.hDiv.loading = true; a("#load_" + b.p.id).show(); if (!b.p.subgridtype)b.p.subgridtype = b.p.datatype; if (a.isFunction(b.p.subgridtype))b.p.subgridtype(f); else b.p.subgridtype = b.p.subgridtype.toLowerCase(); switch (b.p.subgridtype){case "xml":case "json":a.ajax(a.extend({type:b.p.mtype, url:b.p.subGridUrl, dataType:b.p.subgridtype, data:a.isFunction(b.p.serializeSubGridData)?b.p.serializeSubGridData(f):f, complete:function(i){b.p.subgridtype ==
- "xml"?v(i.responseXML, j):w(a.jgrid.parse(i.responseText), j)}}, a.jgrid.ajaxOptions, b.p.ajaxSubgridOptions || {})); break}}return false}, r = function(g, j, f){j = a("
").html(j); a(g).append(j)}, v = function(g, j){var f, d, h, i = a("
"), l = a("
"); for (d = 0; d < b.p.subGridModel[0].name.length; d++){f = a("
"); if (h.repeatitems === true)a(h.cell, this).each(function(q){r(l, a(this).text() || " ", q)}); else{var m = b.p.subGridModel[0].mapping || b.p.subGridModel[0].name; if (m)for (d = 0; d < m.length; d++)r(l, a(m[d], this).text() || " ", d)}a(i).append(l)})}g = a("table:first", b.grid.bDiv).attr("id") + "_"; a("#" + g + j).append(i); b.grid.hDiv.loading =
- false; a("#load_" + b.p.id).hide(); return false}, w = function(g, j){var f, d, h, i, l = a("
"), m = a("
"); for (d = 0; d < b.p.subGridModel[0].name.length; d++){f = a("
"); a(f).html(b.p.subGridModel[0].name[d]); a(f).width(b.p.subGridModel[0].width[d]); a(m).append(f)}a(l).append(m); if (g){f = b.p.jsonReader.subgrid; g = g[f.root]; if (typeof g !== "undefined")for (d = 0; d <
- g.length; d++){h = g[d]; m = a("
"); if (f.repeatitems === true){if (f.cell)h = h[f.cell]; for (i = 0; i < h.length; i++)r(m, h[i] || " ", i)} else{var q = b.p.subGridModel[0].mapping || b.p.subGridModel[0].name; if (q.length)for (i = 0; i < q.length; i++)r(m, h[q[i]] || " ", i)}a(l).append(m)}}d = a("table:first", b.grid.bDiv).attr("id") + "_"; a("#" + d + j).append(l); b.grid.hDiv.loading = false; a("#load_" + b.p.id).hide(); return false}; b.subGridXml = function(g, j){v(g, j)}; b.subGridJson = function(g,
- j){w(g, j)}}})}, expandSubGridRow:function(e){return this.each(function(){var c = this; if (c.grid || e)if (c.p.subGrid === true)if (c = a(this).jqGrid("getInd", e, true))(c = a("td.sgcollapsed", c)[0]) && a(c).trigger("click")})}, collapseSubGridRow:function(e){return this.each(function(){var c = this; if (c.grid || e)if (c.p.subGrid === true)if (c = a(this).jqGrid("getInd", e, true))(c = a("td.sgexpanded", c)[0]) && a(c).trigger("click")})}, toggleSubGridRow:function(e){return this.each(function(){var c = this; if (c.grid || e)if (c.p.subGrid ===
- true)if (c = a(this).jqGrid("getInd", e, true)){var b = a("td.sgcollapsed", c)[0]; if (b)a(b).trigger("click"); else(b = a("td.sgexpanded", c)[0]) && a(b).trigger("click")}})}})})(jQuery);
- (function(d){d.jgrid.extend({setTreeNode:function(a, c){return this.each(function(){var b = this; if (b.grid && b.p.treeGrid){var e = b.p.expColInd, f = b.p.treeReader.expanded_field, j = b.p.treeReader.leaf_field, k = b.p.treeReader.level_field; c.level = a[k]; if (b.p.treeGridModel == "nested"){c.lft = a[b.p.treeReader.left_field]; c.rgt = a[b.p.treeReader.right_field]; a[j] || (a[j] = parseInt(c.rgt, 10) === parseInt(c.lft, 10) + 1?"true":"false")} else c.parent_id = a[b.p.treeReader.parent_id_field]; var g = parseInt(c.level, 10), i; if (b.p.tree_root_level ===
- 0){i = g + 1; g = g} else{i = g; g = g - 1}i = "
"; i += ""; if (parseInt(a[k], 10) !== parseInt(b.p.tree_root_level,
- 10))d(b).jqGrid("isVisibleNode", c) || d(c).css("display", "none"); d("td:eq(" + e + ")", c).wrapInner("").prepend(i); d(".treeclick", c).bind("click", function(h){h = d(h.target || h.srcElement, b.rows).parents("tr.jqgrow")[0].rowIndex; if (!b.rows[h].isLeaf)if (b.rows[h].expanded){d(b).jqGrid("collapseRow", b.rows[h]); d(b).jqGrid("collapseNode", b.rows[h])} else{d(b).jqGrid("expandRow", b.rows[h]); d(b).jqGrid("expandNode", b.rows[h])}return false}); b.p.ExpandColClick === true && d("span", c).css("cursor", "pointer").bind("click",
- function(h){h = d(h.target || h.srcElement, b.rows).parents("tr.jqgrow")[0].rowIndex; if (!b.rows[h].isLeaf)if (b.rows[h].expanded){d(b).jqGrid("collapseRow", b.rows[h]); d(b).jqGrid("collapseNode", b.rows[h])} else{d(b).jqGrid("expandRow", b.rows[h]); d(b).jqGrid("expandNode", b.rows[h])}d(b).jqGrid("setSelection", b.rows[h].id); return false})}})}, setTreeGrid:function(){return this.each(function(){var a = this, c = 0; if (a.p.treeGrid){a.p.treedatatype || d.extend(a.p, {treedatatype:a.p.datatype}); a.p.subGrid = false; a.p.altRows =
- false; a.p.pgbuttons = false; a.p.pginput = false; a.p.multiselect = false; a.p.rowList = []; a.p.treeIcons = d.extend({plus:"ui-icon-triangle-1-" + (a.p.direction == "rtl"?"w":"e"), minus:"ui-icon-triangle-1-s", leaf:"ui-icon-radio-off"}, a.p.treeIcons || {}); if (a.p.treeGridModel == "nested")a.p.treeReader = d.extend({level_field:"level", left_field:"lft", right_field:"rgt", leaf_field:"isLeaf", expanded_field:"expanded"}, a.p.treeReader); else if (a.p.treeGridModel == "adjacency")a.p.treeReader = d.extend({level_field:"level", parent_id_field:"parent",
- leaf_field:"isLeaf", expanded_field:"expanded"}, a.p.treeReader); for (var b in a.p.colModel)if (a.p.colModel.hasOwnProperty(b)){if (a.p.colModel[b].name == a.p.ExpandColumn){a.p.expColInd = c; break}c++}if (!a.p.expColInd)a.p.expColInd = 0; d.each(a.p.treeReader, function(e, f){if (f){a.p.colNames.push(f); a.p.colModel.push({name:f, width:1, hidden:true, sortable:false, resizable:false, hidedlg:true, editable:true, search:false})}})}})}, expandRow:function(a){this.each(function(){var c = this; if (c.grid && c.p.treeGrid){var b =
- d(c).jqGrid("getNodeChildren", a); d(b).each(function(){d(this).css("display", ""); this.expanded && d(c).jqGrid("expandRow", this)})}})}, collapseRow:function(a){this.each(function(){var c = this; if (c.grid && c.p.treeGrid){var b = d(c).jqGrid("getNodeChildren", a); d(b).each(function(){d(this).css("display", "none"); this.expanded && d(c).jqGrid("collapseRow", this)})}})}, getRootNodes:function(){var a = []; this.each(function(){var c = this; if (c.grid && c.p.treeGrid)switch (c.p.treeGridModel){case "nested":var b = c.p.treeReader.level_field;
- d(c.rows).each(function(){parseInt(this[b], 10) === parseInt(c.p.tree_root_level, 10) && a.push(this)}); break; case "adjacency":d(c.rows).each(function(){if (this.parent_id === null || String(this.parent_id).toLowerCase() == "null")a.push(this)}); break}}); return a}, getNodeDepth:function(a){var c = null; this.each(function(){var b = this; if (this.grid && this.p.treeGrid)switch (b.p.treeGridModel){case "nested":c = parseInt(a.level, 10) - parseInt(this.p.tree_root_level, 10); break; case "adjacency":c = d(b).jqGrid("getNodeAncestors",
- a).length; break}}); return c}, getNodeParent:function(a){var c = null; this.each(function(){var b = this; if (b.grid && b.p.treeGrid)switch (b.p.treeGridModel){case "nested":var e = parseInt(a.lft, 10), f = parseInt(a.rgt, 10), j = parseInt(a.level, 10); d(this.rows).each(function(){if (parseInt(this.level, 10) === j - 1 && parseInt(this.lft, 10) < e && parseInt(this.rgt, 10) > f){c = this; return false}}); break; case "adjacency":d(this.rows).each(function(){if (this.id == a.parent_id){c = this; return false}}); break}}); return c}, getNodeChildren:function(a){var c =
- []; this.each(function(){var b = this; if (b.grid && b.p.treeGrid)switch (b.p.treeGridModel){case "nested":var e = parseInt(a.lft, 10), f = parseInt(a.rgt, 10), j = parseInt(a.level, 10); d(this.rows).each(function(){parseInt(this.level, 10) === j + 1 && parseInt(this.lft, 10) > e && parseInt(this.rgt, 10) < f && c.push(this)}); break; case "adjacency":d(this.rows).each(function(){this.parent_id == a.id && c.push(this)}); break}}); return c}, getFullTreeNode:function(a){var c = []; this.each(function(){var b = this, e; if (b.grid && b.p.treeGrid)switch (b.p.treeGridModel){case "nested":var f =
- parseInt(a.lft, 10), j = parseInt(a.rgt, 10), k = parseInt(a.level, 10); d(this.rows).each(function(){parseInt(this.level, 10) >= k && parseInt(this.lft, 10) >= f && parseInt(this.lft, 10) <= j && c.push(this)}); break; case "adjacency":c.push(a); d(this.rows).each(function(g){e = c.length; for (g = 0; g < e; g++)if (c[g].id == this.parent_id){c.push(this); break}}); break}}); return c}, getNodeAncestors:function(a){var c = []; this.each(function(){if (this.grid && this.p.treeGrid)for (var b = d(this).jqGrid("getNodeParent", a); b; ){c.push(b); b = d(this).jqGrid("getNodeParent",
- b)}}); return c}, isVisibleNode:function(a){var c = true; this.each(function(){var b = this; if (b.grid && b.p.treeGrid){b = d(b).jqGrid("getNodeAncestors", a); d(b).each(function(){c = c && this.expanded; if (!c)return false})}}); return c}, isNodeLoaded:function(a){var c; this.each(function(){var b = this; if (b.grid && b.p.treeGrid)c = a.loaded !== undefined?a.loaded:a.isLeaf || d(b).jqGrid("getNodeChildren", a).length > 0?true:false}); return c}, expandNode:function(a){return this.each(function(){if (this.grid && this.p.treeGrid)if (!a.expanded)if (d(this).jqGrid("isNodeLoaded",
- a)){a.expanded = true; d("div.treeclick", a).removeClass(this.p.treeIcons.plus + " tree-plus").addClass(this.p.treeIcons.minus + " tree-minus")} else{a.expanded = true; d("div.treeclick", a).removeClass(this.p.treeIcons.plus + " tree-plus").addClass(this.p.treeIcons.minus + " tree-minus"); this.p.treeANode = a.rowIndex; this.p.datatype = this.p.treedatatype; this.p.treeGridModel == "nested"?d(this).jqGrid("setGridParam", {postData:{nodeid:a.id, n_left:a.lft, n_right:a.rgt, n_level:a.level}}):d(this).jqGrid("setGridParam", {postData:{nodeid:a.id,
- parentid:a.parent_id, n_level:a.level}}); d(this).trigger("reloadGrid"); this.p.treeGridModel == "nested"?d(this).jqGrid("setGridParam", {postData:{nodeid:"", n_left:"", n_right:"", n_level:""}}):d(this).jqGrid("setGridParam", {postData:{nodeid:"", parentid:"", n_level:""}})}})}, collapseNode:function(a){return this.each(function(){if (this.grid && this.p.treeGrid)if (a.expanded){a.expanded = false; d("div.treeclick", a).removeClass(this.p.treeIcons.minus + " tree-minus").addClass(this.p.treeIcons.plus + " tree-plus")}})},
- SortTree:function(a){return this.each(function(){if (this.grid && this.p.treeGrid){var c, b, e, f = [], j = this, k = d(this).jqGrid("getRootNodes"); k.sort(function(g, i){if (g.sortKey < i.sortKey)return - a; if (g.sortKey > i.sortKey)return a; return 0}); if (k[0]){d("td", k[0]).each(function(g){d(this).css("width", j.grid.headers[g].width + "px")}); j.grid.cols = k[0].cells}c = 0; for (b = k.length; c < b; c++){e = k[c]; f.push(e); d(this).jqGrid("collectChildrenSortTree", f, e, a)}d.each(f, function(g, i){d("tbody", j.grid.bDiv).append(i); i.sortKey =
- null})}})}, collectChildrenSortTree:function(a, c, b){return this.each(function(){if (this.grid && this.p.treeGrid){var e, f, j, k = d(this).jqGrid("getNodeChildren", c); k.sort(function(g, i){if (g.sortKey < i.sortKey)return - b; if (g.sortKey > i.sortKey)return b; return 0}); e = 0; for (f = k.length; e < f; e++){j = k[e]; a.push(j); d(this).jqGrid("collectChildrenSortTree", a, j, b)}}})}, setTreeRow:function(a, c){var b = false; this.each(function(){var e = this; if (e.grid && e.p.treeGrid)b = d(e).jqGrid("setRowData", a, c)}); return b}, delTreeNode:function(a){return this.each(function(){var c =
- this; if (c.grid && c.p.treeGrid){var b = d(c).jqGrid("getInd", a, true); if (b){var e = d(c).jqGrid("getNodeChildren", b); if (e.length > 0)for (var f = 0; f < e.length; f++)d(c).jqGrid("delRowData", e[f].id); d(c).jqGrid("delRowData", b.id)}}})}})})(jQuery);
- (function(b){b.jgrid.extend({jqGridImport:function(a){a = b.extend({imptype:"xml", impstring:"", impurl:"", mtype:"GET", impData:{}, xmlGrid:{config:"roots>grid", data:"roots>rows"}, jsonGrid:{config:"grid", data:"data"}, ajaxOptions:{}}, a || {}); return this.each(function(){var e = this, c = function(d, g){var f = b(g.xmlGrid.config, d)[0]; g = b(g.xmlGrid.data, d)[0]; var k; if (xmlJsonClass.xml2json && b.jgrid.parse){f = xmlJsonClass.xml2json(f, " "); f = b.jgrid.parse(f); for (var h in f)if (f.hasOwnProperty(h))k = f[h]; if (g){h = f.grid.datatype;
- f.grid.datatype = "xmlstring"; f.grid.datastr = d; b(e).jqGrid(k).jqGrid("setGridParam", {datatype:h})} else b(e).jqGrid(k)} else alert("xml2json or parse are not present")}, i = function(d, g){if (d && typeof d == "string"){var f = b.jgrid.parse(d); d = f[g.jsonGrid.config]; if (g = f[g.jsonGrid.data]){f = d.datatype; d.datatype = "jsonstring"; d.datastr = g; b(e).jqGrid(d).jqGrid("setGridParam", {datatype:f})} else b(e).jqGrid(d)}}; switch (a.imptype){case "xml":b.ajax(b.extend({url:a.impurl, type:a.mtype, data:a.impData, dataType:"xml",
- complete:function(d, g){if (g == "success"){c(d.responseXML, a); b.isFunction(a.importComplete) && a.importComplete(d)}}}, a.ajaxOptions)); break; case "xmlstring":if (a.impstring && typeof a.impstring == "string"){var j = b.jgrid.stringToDoc(a.impstring); if (j){c(j, a); b.isFunction(a.importComplete) && a.importComplete(j); a.impstring = null}j = null}break; case "json":b.ajax(b.extend({url:a.impurl, type:a.mtype, data:a.impData, dataType:"json", complete:function(d, g){if (g == "success"){i(d.responseText, a); b.isFunction(a.importComplete) &&
- a.importComplete(d)}}}, a.ajaxOptions)); break; case "jsonstring":if (a.impstring && typeof a.impstring == "string"){i(a.impstring, a); b.isFunction(a.importComplete) && a.importComplete(a.impstring); a.impstring = null}break}})}, jqGridExport:function(a){a = b.extend({exptype:"xmlstring", root:"grid", ident:"\t"}, a || {}); var e = null; this.each(function(){if (this.grid){var c = b.extend({}, b(this).jqGrid("getGridParam")); if (c.rownumbers){c.colNames.splice(0, 1); c.colModel.splice(0, 1)}if (c.multiselect){c.colNames.splice(0, 1);
- c.colModel.splice(0, 1)}if (c.subGrid){c.colNames.splice(0, 1); c.colModel.splice(0, 1)}c.knv = null; if (c.treeGrid)for (var i in c.treeReader)if (c.treeReader.hasOwnProperty(i)){c.colNames.splice(c.colNames.length - 1); c.colModel.splice(c.colModel.length - 1)}switch (a.exptype){case "xmlstring":e = "<" + a.root + ">" + xmlJsonClass.json2xml(c, a.ident) + "" + a.root + ">"; break; case "jsonstring":e = "{" + xmlJsonClass.toJson(c, a.root, a.ident) + "}"; if (c.postData.filters !== undefined){e = e.replace(/filters":"/, 'filters":'); e = e.replace(/}]}"/,
- "}]}")}break}}}); return e}, excelExport:function(a){a = b.extend({exptype:"remote", url:null, oper:"oper", tag:"excel", exportOptions:{}}, a || {}); return this.each(function(){$t = this; if (this.grid)if (a.exptype == "remote"){var e = b.extend({}, this.p.postData); e[a.oper] = a.tag; e = jQuery.param(e); window.location = a.url + "?" + e}})}})})(jQuery);
- var xmlJsonClass = {xml2json:function(a, b){if (a.nodeType === 9)a = a.documentElement; a = this.toJson(this.toObj(this.removeWhite(a)), a.nodeName, "\t"); return"{\n" + b + (b?a.replace(/\t/g, b):a.replace(/\t|\n/g, "")) + "\n}"}, json2xml:function(a, b){var g = function(d, c, j){var i = "", k, h; if (d instanceof Array)if (d.length === 0)i += j + "<" + c + ">__EMPTY_ARRAY_" + c + ">\n"; else{k = 0; for (h = d.length; k < h; k += 1){var l = j + g(d[k], c, j + "\t") + "\n"; i += l}} else if (typeof d === "object"){k = false; i += j + "<" + c; for (h in d)if (d.hasOwnProperty(h))if (h.charAt(0) ===
- "@")i += " " + h.substr(1) + '="' + d[h].toString() + '"'; else k = true; i += k?">":"/>"; if (k){for (h in d)if (d.hasOwnProperty(h))if (h === "#text")i += d[h]; else if (h === "#cdata")i += ""; else if (h.charAt(0) !== "@")i += g(d[h], h, j + "\t"); i += (i.charAt(i.length - 1) === "\n"?j:"") + "" + c + ">"}} else i += typeof d === "function"?j + "<" + c + ">" + c + ">":d.toString() === '""' || d.toString().length === 0?j + "<" + c + ">__EMPTY_STRING_" + c + ">":j + "<" + c + ">" + d.toString() + "" + c + ">"; return i}, e = "", f; for (f in a)if (a.hasOwnProperty(f))e +=
- g(a[f], f, ""); return b?e.replace(/\t/g, b):e.replace(/\t|\n/g, "")}, toObj:function(a){var b = {}, g = /function/i; if (a.nodeType === 1){if (a.attributes.length){var e; for (e = 0; e < a.attributes.length; e += 1)b["@" + a.attributes[e].nodeName] = (a.attributes[e].nodeValue || "").toString()}if (a.firstChild){var f = e = 0, d = false, c; for (c = a.firstChild; c; c = c.nextSibling)if (c.nodeType === 1)d = true; else if (c.nodeType === 3 && c.nodeValue.match(/[^ \f\n\r\t\v]/))e += 1; else if (c.nodeType === 4)f += 1; if (d)if (e < 2 && f < 2){this.removeWhite(a); for (c =
- a.firstChild; c; c = c.nextSibling)if (c.nodeType === 3)b["#text"] = this.escape(c.nodeValue); else if (c.nodeType === 4)if (g.test(c.nodeValue))b[c.nodeName] = [b[c.nodeName], c.nodeValue]; else b["#cdata"] = this.escape(c.nodeValue); else if (b[c.nodeName])if (b[c.nodeName]instanceof Array)b[c.nodeName][b[c.nodeName].length] = this.toObj(c); else b[c.nodeName] = [b[c.nodeName], this.toObj(c)]; else b[c.nodeName] = this.toObj(c)} else if (a.attributes.length)b["#text"] = this.escape(this.innerXml(a)); else b = this.escape(this.innerXml(a));
- else if (e)if (a.attributes.length)b["#text"] = this.escape(this.innerXml(a)); else{b = this.escape(this.innerXml(a)); if (b === "__EMPTY_ARRAY_")b = "[]"; else if (b === "__EMPTY_STRING_")b = ""} else if (f)if (f > 1)b = this.escape(this.innerXml(a)); else for (c = a.firstChild; c; c = c.nextSibling)if (g.test(a.firstChild.nodeValue)){b = a.firstChild.nodeValue; break} else b["#cdata"] = this.escape(c.nodeValue)}if (!a.attributes.length && !a.firstChild)b = null} else if (a.nodeType === 9)b = this.toObj(a.documentElement); else alert("unhandled node type: " +
- a.nodeType); return b}, toJson:function(a, b, g){var e = b?'"' + b + '"':""; if (a === "[]")e += b?":[]":"[]"; else if (a instanceof Array){var f, d, c = []; d = 0; for (f = a.length; d < f; d += 1)c[d] = this.toJson(a[d], "", g + "\t"); e += (b?":[":"[") + (c.length > 1?"\n" + g + "\t" + c.join(",\n" + g + "\t") + "\n" + g:c.join("")) + "]"} else if (a === null)e += (b && ":") + "null"; else if (typeof a === "object"){f = []; for (d in a)if (a.hasOwnProperty(d))f[f.length] = this.toJson(a[d], d, g + "\t"); e += (b?":{":"{") + (f.length > 1?"\n" + g + "\t" + f.join(",\n" + g + "\t") + "\n" + g:f.join("")) +
- "}"} else if (typeof a === "string"){g = /function/i; f = a.toString(); e += /(^-?\d+\.?\d*$)/.test(f) || g.test(f) || f === "false" || f === "true"?(b && ":") + f:(b && ":") + '"' + a + '"'} else e += (b && ":") + a.toString(); return e}, innerXml:function(a){var b = ""; if ("innerHTML"in a)b = a.innerHTML; else{var g = function(e){var f = "", d; if (e.nodeType === 1){f += "<" + e.nodeName; for (d = 0; d < e.attributes.length; d += 1)f += " " + e.attributes[d].nodeName + '="' + (e.attributes[d].nodeValue || "").toString() + '"'; if (e.firstChild){f += ">"; for (d = e.firstChild; d; d = d.nextSibling)f +=
- g(d); f += "" + e.nodeName + ">"} else f += "/>"} else if (e.nodeType === 3)f += e.nodeValue; else if (e.nodeType === 4)f += ""; return f}; for (a = a.firstChild; a; a = a.nextSibling)b += g(a)}return b}, escape:function(a){return a.replace(/[\\]/g, "\\\\").replace(/[\"]/g, '\\"').replace(/[\n]/g, "\\n").replace(/[\r]/g, "\\r")}, removeWhite:function(a){a.normalize(); var b; for (b = a.firstChild; b; )if (b.nodeType === 3)if (b.nodeValue.match(/[^ \f\n\r\t\v]/))b = b.nextSibling; else{var g = b.nextSibling; a.removeChild(b);
- b = g} else{b.nodeType === 1 && this.removeWhite(b); b = b.nextSibling}return a}};
- (function(b){b.jgrid.extend({setColumns:function(a){a = b.extend({top:0, left:0, width:200, height:"auto", dataheight:"auto", modal:false, drag:true, beforeShowForm:null, afterShowForm:null, afterSubmitForm:null, closeOnEscape:true, ShrinkToFit:false, jqModal:false, saveicon:[true, "left", "ui-icon-disk"], closeicon:[true, "left", "ui-icon-close"], onClose:null, colnameview:true, closeAfterSubmit:true, updateAfterCheck:false, recreateForm:false}, b.jgrid.col, a || {}); return this.each(function(){var c = this; if (c.grid){var j = typeof a.beforeShowForm ===
- "function"?true:false, k = typeof a.afterShowForm === "function"?true:false, l = typeof a.afterSubmitForm === "function"?true:false, e = c.p.id, d = "ColTbl_" + e, f = {themodal:"colmod" + e, modalhead:"colhd" + e, modalcontent:"colcnt" + e, scrollelm:d}; a.recreateForm === true && b("#" + f.themodal).html() != null && b("#" + f.themodal).remove(); if (b("#" + f.themodal).html() != null){j && a.beforeShowForm(b("#" + d)); viewModal("#" + f.themodal, {gbox:"#gbox_" + e, jqm:a.jqModal, jqM:false, modal:a.modal})} else{var g = isNaN(a.dataheight)?a.dataheight:a.dataheight +
- "px"; g = "
"; g += "
"; for (i = 0; i < this.p.colNames.length; i++)c.p.colModel[i].hidedlg || (g += "
";"first"===c.position?0===e.rows[0].cells.length?a("tr",e).append(h):a("tr td:eq(0)",e).before(h):a("tr",e).append(h)}}})},GridToForm:function(b,c){return this.each(function(){var e=
+this,h;if(e.grid){var w=a(e).jqGrid("getRowData",b);if(w)for(h in w)w.hasOwnProperty(h)&&(a("[name="+a.jgrid.jqID(h)+"]",c).is("input:radio")||a("[name="+a.jgrid.jqID(h)+"]",c).is("input:checkbox")?a("[name="+a.jgrid.jqID(h)+"]",c).each(function(){if(a(this).val()==w[h])a(this)[e.p.useProp?"prop":"attr"]("checked",!0);else a(this)[e.p.useProp?"prop":"attr"]("checked",!1)}):a("[name="+a.jgrid.jqID(h)+"]",c).val(w[h]))}})},FormToGrid:function(b,c,e,h){return this.each(function(){if(this.grid){e||(e=
+"set");h||(h="first");var w=a(c).serializeArray(),t={};a.each(w,function(a,b){t[b.name]=b.value});"add"===e?a(this).jqGrid("addRowData",b,t,h):"set"===e&&a(this).jqGrid("setRowData",b,t)}})}})})(jQuery);
+(function(a){a.fn.jqFilter=function(d){if("string"===typeof d){var q=a.fn.jqFilter[d];if(!q)throw"jqFilter - No such method: "+d;var x=a.makeArray(arguments).slice(1);return q.apply(this,x)}var n=a.extend(!0,{filter:null,columns:[],onChange:null,afterRedraw:null,checkValues:null,error:!1,errmsg:"",errorcheck:!0,showQuery:!0,sopt:null,ops:[],operands:null,numopts:"eq ne lt le gt ge nu nn in ni".split(" "),stropts:"eq ne bw bn ew en cn nc nu nn in ni".split(" "),strarr:["text","string","blob"],groupOps:[{op:"AND",
+text:"AND"},{op:"OR",text:"OR"}],groupButton:!0,ruleButtons:!0,direction:"ltr"},a.jgrid.filter,d||{});return this.each(function(){if(!this.filter){this.p=n;if(null===this.p.filter||void 0===this.p.filter)this.p.filter={groupOp:this.p.groupOps[0].op,rules:[],groups:[]};var d,q=this.p.columns.length,f,w=/msie/i.test(navigator.userAgent)&&!window.opera;this.p.initFilter=a.extend(!0,{},this.p.filter);if(q){for(d=0;d