rbbt-views 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +20 -0
- data/lib/rbbt/workflow/rest/auth.rb +69 -0
- data/lib/rbbt/workflow/rest/client.rb +162 -0
- data/lib/rbbt/workflow/rest/entity.rb +77 -0
- data/lib/rbbt/workflow/rest/render.rb +209 -0
- data/lib/rbbt/workflow/rest/util.rb +329 -0
- data/lib/rbbt/workflow/rest.rb +437 -0
- data/share/views/compass/_base.sass +19 -0
- data/share/views/compass/app.sass +103 -0
- data/share/views/compass/compass.config +33 -0
- data/share/views/compass/form.sass +23 -0
- data/share/views/compass/layout.sass +0 -0
- data/share/views/compass/main.sass +161 -0
- data/share/views/compass/screen.sass +8 -0
- data/share/views/dependencies.haml +7 -0
- data/share/views/entity/Gene.haml +6 -0
- data/share/views/error.haml +2 -0
- data/share/views/files.haml +5 -0
- data/share/views/form.haml +66 -0
- data/share/views/info.haml +19 -0
- data/share/views/job_list.haml +5 -0
- data/share/views/js/app.js +221 -0
- data/share/views/layout.haml +89 -0
- data/share/views/partials/_context_control.haml +14 -0
- data/share/views/partials/_job_control.haml +17 -0
- data/share/views/partials/_result_table.haml +43 -0
- data/share/views/partials/_result_table_controls.haml +47 -0
- data/share/views/public/plugins/jqgrid/css/ellipsis-xbl.xml +13 -0
- data/share/views/public/plugins/jqgrid/css/ui.jqgrid.css +140 -0
- data/share/views/public/plugins/jqgrid/js/Changes.txt +1160 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-ar.js +126 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-bg.js +132 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-bg1251.js +132 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-cat.js +128 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-cn.js +132 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-cs.js +128 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-da.js +128 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-de.js +133 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-el.js +126 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-en.js +128 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-es.js +128 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-fa.js +145 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-fi.js +128 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-fr.js +126 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-gl.js +126 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-he.js +127 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-hu.js +129 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-is.js +126 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-it.js +1 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-ja.js +155 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-lt.js +128 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-mne.js +128 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-nl.js +149 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-no.js +1 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-pl.js +127 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-pt-br.js +127 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-pt.js +125 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-ro.js +139 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-ru.js +127 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-sk.js +127 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-sr.js +128 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-sv.js +127 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-th.js +128 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-tr.js +126 -0
- data/share/views/public/plugins/jqgrid/js/i18n/grid.locale-ua.js +127 -0
- data/share/views/public/plugins/jqgrid/js/install.txt +43 -0
- data/share/views/public/plugins/jqgrid/js/jquery-1.5.2.min.js +16 -0
- data/share/views/public/plugins/jqgrid/js/jquery.jqGrid.min.js +464 -0
- data/share/views/public/plugins/jqgrid/js/jquery.jqGrid.src.js +10977 -0
- data/share/views/public/plugins/jqgrid/plugins/grid.addons.js +704 -0
- data/share/views/public/plugins/jqgrid/plugins/grid.postext.js +64 -0
- data/share/views/public/plugins/jqgrid/plugins/grid.setcolumns.js +126 -0
- data/share/views/public/plugins/jqgrid/plugins/jquery.contextmenu.js +144 -0
- data/share/views/public/plugins/jqgrid/plugins/jquery.searchFilter.js +716 -0
- data/share/views/public/plugins/jqgrid/plugins/jquery.tablednd.js +383 -0
- data/share/views/public/plugins/jqgrid/plugins/ui.multiselect.css +30 -0
- data/share/views/public/plugins/jqgrid/plugins/ui.multiselect.js +314 -0
- data/share/views/public/plugins/jqgrid/src/JsonXml.js +338 -0
- data/share/views/public/plugins/jqgrid/src/css/ellipsis-xbl.xml +13 -0
- data/share/views/public/plugins/jqgrid/src/css/ui.jqgrid.css +140 -0
- data/share/views/public/plugins/jqgrid/src/css/ui.multiselect.css +30 -0
- data/share/views/public/plugins/jqgrid/src/grid.base.js +3279 -0
- data/share/views/public/plugins/jqgrid/src/grid.celledit.js +488 -0
- data/share/views/public/plugins/jqgrid/src/grid.common.js +668 -0
- data/share/views/public/plugins/jqgrid/src/grid.custom.js +440 -0
- data/share/views/public/plugins/jqgrid/src/grid.filter.js +713 -0
- data/share/views/public/plugins/jqgrid/src/grid.formedit.js +1964 -0
- data/share/views/public/plugins/jqgrid/src/grid.grouping.js +292 -0
- data/share/views/public/plugins/jqgrid/src/grid.import.js +201 -0
- data/share/views/public/plugins/jqgrid/src/grid.inlinedit.js +311 -0
- data/share/views/public/plugins/jqgrid/src/grid.jqueryui.js +504 -0
- data/share/views/public/plugins/jqgrid/src/grid.loader.js +50 -0
- data/share/views/public/plugins/jqgrid/src/grid.subgrid.js +292 -0
- data/share/views/public/plugins/jqgrid/src/grid.tbltogrid.js +106 -0
- data/share/views/public/plugins/jqgrid/src/grid.treegrid.js +666 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-ar.js +126 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-bg.js +132 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-bg1251.js +132 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-cat.js +128 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-cn.js +132 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-cs.js +128 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-da.js +128 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-de.js +133 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-dk.js +128 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-el.js +126 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-en.js +128 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-es.js +128 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-fa.js +145 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-fi.js +128 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-fr.js +126 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-gl.js +126 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-he.js +127 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-hu.js +129 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-is.js +126 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-it.js +1 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-ja.js +155 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-lt.js +128 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-mne.js +128 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-nl.js +149 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-no.js +1 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-pl.js +127 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-pt-br.js +127 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-pt.js +125 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-ro.js +139 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-ru.js +127 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-sk.js +127 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-sr.js +128 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-sv.js +127 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-th.js +128 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-tr.js +126 -0
- data/share/views/public/plugins/jqgrid/src/i18n/grid.locale-ua.js +127 -0
- data/share/views/public/plugins/jqgrid/src/jqDnR.js +71 -0
- data/share/views/public/plugins/jqgrid/src/jqModal.js +69 -0
- data/share/views/public/plugins/jqgrid/src/jquery.fmatter.js +583 -0
- data/share/views/public/plugins/jquery/js/jquery-1.6.2.min.js +18 -0
- data/share/views/public/plugins/jquery-ui/css/custom-theme/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/share/views/public/plugins/jquery-ui/css/custom-theme/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/share/views/public/plugins/jquery-ui/css/custom-theme/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/share/views/public/plugins/jquery-ui/css/custom-theme/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/share/views/public/plugins/jquery-ui/css/custom-theme/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/share/views/public/plugins/jquery-ui/css/custom-theme/images/ui-bg_glass_75_ffffff_1x400.png +0 -0
- data/share/views/public/plugins/jquery-ui/css/custom-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/share/views/public/plugins/jquery-ui/css/custom-theme/images/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
- data/share/views/public/plugins/jquery-ui/css/custom-theme/images/ui-icons_222222_256x240.png +0 -0
- data/share/views/public/plugins/jquery-ui/css/custom-theme/images/ui-icons_2e83ff_256x240.png +0 -0
- data/share/views/public/plugins/jquery-ui/css/custom-theme/images/ui-icons_454545_256x240.png +0 -0
- data/share/views/public/plugins/jquery-ui/css/custom-theme/images/ui-icons_888888_256x240.png +0 -0
- data/share/views/public/plugins/jquery-ui/css/custom-theme/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/share/views/public/plugins/jquery-ui/css/custom-theme/jquery-ui-1.8.14.custom.css +568 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/AUTHORS.txt +30 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/GPL-LICENSE.txt +278 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/MIT-LICENSE.txt +25 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/accordion/collapsible.html +57 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/accordion/custom-icons.html +69 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/accordion/default.html +85 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/accordion/fillspace.html +76 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/accordion/hoverintent.html +134 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/accordion/index.html +25 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/accordion/mouseover.html +57 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/accordion/no-auto-height.html +60 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/accordion/sortable.html +83 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/addClass/default.html +52 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/addClass/index.html +18 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/animate/default.html +61 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/animate/index.html +18 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/categories.html +71 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/combobox.html +174 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/custom-data.html +95 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/default.html +64 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/folding.html +62 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/images/jquery_32x32.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/images/jqueryui_32x32.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/images/sizzlejs_32x32.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/images/transparent_1x1.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/images/ui-anim_basic_16x16.gif +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/index.html +27 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/london.xml +114 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/maxheight.html +79 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/multiple-remote.html +84 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/multiple.html +99 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/remote-jsonp.html +86 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/remote-with-cache.html +59 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/remote.html +59 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/search.php +640 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/autocomplete/xml.html +72 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/button/checkbox.html +44 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/button/default.html +38 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/button/icons.html +56 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/button/index.html +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/button/radio.html +39 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/button/splitbutton.html +55 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/button/toolbar.html +120 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/datepicker/alt-field.html +36 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/datepicker/animation.html +58 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/datepicker/buttonbar.html +35 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/datepicker/date-formats.html +47 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/datepicker/date-range.html +49 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/datepicker/default.html +33 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/datepicker/dropdown-month-year.html +36 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/datepicker/icon-trigger.html +37 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/datepicker/images/calendar.gif +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/datepicker/index.html +31 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/datepicker/inline.html +33 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/datepicker/localization.html +162 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/datepicker/min-max.html +33 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/datepicker/multiple-calendars.html +36 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/datepicker/other-months.html +37 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/datepicker/show-week.html +39 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/demos.css +334 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/dialog/animated.html +56 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/dialog/default.html +54 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/dialog/index.html +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/dialog/modal-confirmation.html +69 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/dialog/modal-form.html +167 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/dialog/modal-message.html +71 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/dialog/modal.html +60 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/draggable/constrain-movement.html +69 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/draggable/cursor-style.html +49 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/draggable/default.html +39 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/draggable/delay-start.html +45 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/draggable/events.html +77 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/draggable/handle.html +50 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/draggable/index.html +28 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/draggable/revert.html +44 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/draggable/scroll.html +51 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/draggable/snap-to.html +68 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/draggable/sortable.html +57 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/draggable/visual-feedback.html +77 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/droppable/accepted-elements.html +60 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/droppable/default.html +53 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/droppable/images/high_tatras.jpg +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/droppable/images/high_tatras2.jpg +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/droppable/images/high_tatras2_min.jpg +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/droppable/images/high_tatras3.jpg +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/droppable/images/high_tatras3_min.jpg +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/droppable/images/high_tatras4.jpg +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/droppable/images/high_tatras4_min.jpg +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/droppable/images/high_tatras_min.jpg +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/droppable/index.html +24 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/droppable/photo-manager.html +184 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/droppable/propagation.html +80 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/droppable/revert.html +61 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/droppable/shopping-cart.html +101 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/droppable/visual-feedback.html +78 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/effect/default.html +109 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/effect/easing.html +108 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/effect/index.html +19 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/hide/default.html +102 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/hide/index.html +18 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/images/calendar.gif +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/images/demo-config-on-tile.gif +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/images/demo-config-on.gif +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/images/demo-spindown-closed.gif +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/images/demo-spindown-open.gif +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/images/icon-docs-info.gif +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/images/pbar-ani.gif +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/index.html +321 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/position/cycler.html +122 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/position/default.html +153 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/position/images/earth.jpg +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/position/images/flight.jpg +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/position/images/rocket.jpg +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/position/index.html +19 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/progressbar/animated.html +44 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/progressbar/default.html +35 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/progressbar/images/pbar-ani.gif +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/progressbar/index.html +20 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/progressbar/resize.html +40 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/removeClass/default.html +52 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/removeClass/index.html +18 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/resizable/animate.html +43 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/resizable/aspect-ratio.html +42 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/resizable/constrain-area.html +47 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/resizable/default.html +40 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/resizable/delay-start.html +52 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/resizable/helper.html +43 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/resizable/index.html +28 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/resizable/max-min.html +45 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/resizable/snap-to-grid.html +42 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/resizable/synchronous-resize.html +49 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/resizable/textarea.html +41 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/resizable/visual-feedback.html +43 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/selectable/default.html +50 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/selectable/display-grid.html +55 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/selectable/index.html +20 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/selectable/serialize.html +61 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/show/default.html +104 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/show/index.html +18 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/slider/colorpicker.html +95 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/slider/default.html +37 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/slider/hotelrooms.html +59 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/slider/index.html +29 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/slider/multiple-vertical.html +77 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/slider/range-vertical.html +51 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/slider/range.html +52 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/slider/rangemax.html +50 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/slider/rangemin.html +51 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/slider/side-scroll.html +140 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/slider/slider-vertical.html +52 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/slider/steps.html +51 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/slider/tabs.html +67 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/sortable/connect-lists-through-tabs.html +78 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/sortable/connect-lists.html +58 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/sortable/default.html +51 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/sortable/delay-start.html +67 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/sortable/display-grid.html +54 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/sortable/empty-lists.html +69 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/sortable/index.html +26 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/sortable/items.html +70 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/sortable/placeholder.html +56 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/sortable/portlets.html +96 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/switchClass/default.html +47 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/switchClass/index.html +18 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/tabs/ajax/content1.html +4 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/tabs/ajax/content2.html +4 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/tabs/ajax/content3-slow.php +7 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/tabs/ajax/content4-broken.php +3 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/tabs/ajax.html +53 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/tabs/bottom.html +60 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/tabs/collapsible.html +55 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/tabs/cookie.html +57 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/tabs/default.html +49 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/tabs/index.html +25 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/tabs/manipulation.html +124 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/tabs/mouseover.html +53 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/tabs/sortable.html +58 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/tabs/vertical.html +61 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/toggle/default.html +94 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/toggle/index.html +18 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/toggleClass/default.html +46 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/demos/toggleClass/index.html +18 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/accordion.html +1017 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/addClass.html +109 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/animate.html +78 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/autocomplete.html +875 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/button.html +500 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/datepicker.html +2570 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/dialog.html +1698 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/draggable.html +1577 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/droppable.html +829 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/effect.html +143 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/hide.html +144 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/position.html +227 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/progressbar.html +460 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/removeClass.html +113 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/resizable.html +1201 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/selectable.html +848 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/show.html +144 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/slider.html +860 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/sortable.html +1953 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/switchClass.html +129 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/tabs.html +1549 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/toggle.html +144 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/docs/toggleClass.html +111 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/external/jquery.bgiframe-2.1.2.js +39 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/external/jquery.cookie.js +89 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/external/jquery.metadata.js +122 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/external/qunit.css +153 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/external/qunit.js +1261 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/jquery-1.5.1.js +8316 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/images/ui-icons_222222_256x240.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/images/ui-icons_2e83ff_256x240.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/images/ui-icons_454545_256x240.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/images/ui-icons_888888_256x240.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/jquery.ui.accordion.css +19 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/jquery.ui.all.css +11 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/jquery.ui.autocomplete.css +53 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/jquery.ui.base.css +11 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/jquery.ui.button.css +38 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/jquery.ui.core.css +41 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/jquery.ui.datepicker.css +68 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/jquery.ui.dialog.css +21 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/jquery.ui.progressbar.css +11 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/jquery.ui.resizable.css +20 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/jquery.ui.selectable.css +10 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/jquery.ui.slider.css +24 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/jquery.ui.tabs.css +18 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/base/jquery.ui.theme.css +247 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/images/ui-bg_glass_75_ffffff_1x400.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/images/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/images/ui-icons_222222_256x240.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/images/ui-icons_2e83ff_256x240.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/images/ui-icons_454545_256x240.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/images/ui-icons_888888_256x240.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/jquery-ui-1.8.14.custom.css +568 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/jquery.ui.accordion.css +19 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/jquery.ui.all.css +11 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/jquery.ui.autocomplete.css +53 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/jquery.ui.base.css +11 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/jquery.ui.button.css +38 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/jquery.ui.core.css +41 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/jquery.ui.datepicker.css +68 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/jquery.ui.dialog.css +21 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/jquery.ui.progressbar.css +11 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/jquery.ui.resizable.css +20 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/jquery.ui.selectable.css +10 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/jquery.ui.slider.css +24 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/jquery.ui.tabs.css +18 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/themes/custom-theme/jquery.ui.theme.css +249 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery-ui-i18n.js +1379 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-af.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-ar-DZ.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-ar.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-az.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-bg.js +24 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-bs.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-ca.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-cs.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-da.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-de.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-el.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-en-AU.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-en-GB.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-en-NZ.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-eo.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-es.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-et.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-eu.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-fa.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-fi.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-fo.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-fr-CH.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-fr.js +25 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-gl.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-he.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-hr.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-hu.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-hy.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-id.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-is.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-it.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-ja.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-ko.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-kz.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-lt.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-lv.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-ml.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-ms.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-nl.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-no.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-pl.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-pt-BR.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-pt.js +22 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-rm.js +21 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-ro.js +26 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-ru.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-sk.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-sl.js +24 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-sq.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-sr-SR.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-sr.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-sv.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-ta.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-th.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-tj.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-tr.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-uk.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-vi.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-zh-CN.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-zh-HK.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/i18n/jquery.ui.datepicker-zh-TW.js +23 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery-ui-1.8.14.custom.js +11729 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.effects.blind.js +49 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.effects.bounce.js +78 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.effects.clip.js +54 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.effects.core.js +746 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.effects.drop.js +50 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.effects.explode.js +79 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.effects.fade.js +32 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.effects.fold.js +56 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.effects.highlight.js +50 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.effects.pulsate.js +51 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.effects.scale.js +178 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.effects.shake.js +57 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.effects.slide.js +50 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.effects.transfer.js +45 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.accordion.js +611 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.autocomplete.js +612 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.button.js +416 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.core.js +312 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.datepicker.js +1814 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.dialog.js +878 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.draggable.js +823 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.droppable.js +296 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.mouse.js +160 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.position.js +252 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.progressbar.js +109 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.resizable.js +842 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.selectable.js +266 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.slider.js +666 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.sortable.js +1077 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.tabs.js +758 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/jquery.ui.widget.js +262 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.effects.blind.min.js +14 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.effects.bounce.min.js +15 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.effects.clip.min.js +14 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.effects.core.min.js +30 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.effects.drop.min.js +14 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.effects.explode.min.js +15 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.effects.fade.min.js +13 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.effects.fold.min.js +14 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.effects.highlight.min.js +14 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.effects.pulsate.min.js +14 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.effects.scale.min.js +20 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.effects.shake.min.js +14 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.effects.slide.min.js +14 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.effects.transfer.min.js +14 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.accordion.min.js +30 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.autocomplete.min.js +32 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.button.min.js +27 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.core.min.js +17 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.datepicker.min.js +83 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.dialog.min.js +40 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.draggable.min.js +50 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.droppable.min.js +27 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.mouse.min.js +17 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.position.min.js +16 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.progressbar.min.js +16 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.resizable.min.js +49 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.selectable.min.js +22 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.slider.min.js +33 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.sortable.min.js +60 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.tabs.min.js +35 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/ui/minified/jquery.ui.widget.min.js +15 -0
- data/share/views/public/plugins/jquery-ui/development-bundle/version.txt +1 -0
- data/share/views/public/plugins/jquery-ui/index.html +367 -0
- data/share/views/public/plugins/jquery-ui/js/jquery-1.5.1.min.js +16 -0
- data/share/views/public/plugins/jquery-ui/js/jquery-ui-1.8.14.custom.min.js +789 -0
- data/share/views/result.haml +38 -0
- data/share/views/task_list.haml +7 -0
- data/share/views/wait.haml +2 -0
- data/share/views/workflow_list.haml +5 -0
- data/test/rbbt/workflow/rest/test_client.rb +29 -0
- data/test/test_helper.rb +4 -0
- metadata +686 -0
@@ -0,0 +1,464 @@
|
|
1
|
+
/*
|
2
|
+
* jqGrid 4.1.1 - jQuery Grid
|
3
|
+
* Copyright (c) 2008, Tony Tomov, tony@trirand.com
|
4
|
+
* Dual licensed under the MIT and GPL licenses
|
5
|
+
* http://www.opensource.org/licenses/mit-license.php
|
6
|
+
* http://www.gnu.org/licenses/gpl-2.0.html
|
7
|
+
* Date:2011-06-19
|
8
|
+
* Modules: grid.base.js; jquery.fmatter.js; grid.custom.js; grid.common.js; grid.formedit.js; grid.filter.js; grid.inlinedit.js; grid.celledit.js; jqModal.js; jqDnR.js; grid.subgrid.js; grid.grouping.js; grid.treegrid.js; grid.import.js; JsonXml.js; grid.tbltogrid.js; grid.jqueryui.js;
|
9
|
+
*/
|
10
|
+
(function(b){b.jgrid=b.jgrid||{};b.extend(b.jgrid,{htmlDecode:function(f){if(f&&(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(/</g,"<").replace(/\"/g,""")},format:function(f){var j=b.makeArray(arguments).slice(1);if(f===undefined)f="";return f.replace(/\{(\d+)\}/g,
|
11
|
+
function(h,c){return j[c]})},getCellIndex:function(f){f=b(f);if(f.is("tr"))return-1;f=(!f.is("td")&&!f.is("th")?f.closest("td,th"):f)[0];if(b.browser.msie)return b.inArray(f,f.parentNode.cells);return f.cellIndex},stripHtml:function(f){f+="";var j=/<("[^"]*"|'[^']*'|[^'">])*>/gi;if(f)return(f=f.replace(j,""))&&f!==" "&&f!==" "?f.replace(/\"/g,"'"):"";else return f},stringToDoc:function(f){var j;if(typeof f!=="string")return f;try{j=(new DOMParser).parseFromString(f,"text/xml")}catch(h){j=
|
12
|
+
new ActiveXObject("Microsoft.XMLDOM");j.async=false;j.loadXML(f)}return j&&j.documentElement&&j.documentElement.tagName!="parsererror"?j:null},parse:function(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+")")},parseDate:function(f,j){var h={m:1,d:1,y:1970,h:0,i:0,s:0},c,g,k;c=/[\\\/:_;.,\t\T\s-]/;if(j&&j!==null&&j!==undefined){j=
|
13
|
+
b.trim(j);j=j.split(c);f=f.split(c);var l=b.jgrid.formatter.date.monthNames,a=b.jgrid.formatter.date.AmPm,r=function(x,y){if(x===0){if(y==12)y=0}else if(y!=12)y+=12;return y};c=0;for(g=f.length;c<g;c++){if(f[c]=="M"){k=b.inArray(j[c],l);if(k!==-1&&k<12)j[c]=k+1}if(f[c]=="F"){k=b.inArray(j[c],l);if(k!==-1&&k>11)j[c]=k+1-12}if(f[c]=="a"){k=b.inArray(j[c],a);if(k!==-1&&k<2&&j[c]==a[k]){j[c]=k;h.h=r(j[c],h.h)}}if(f[c]=="A"){k=b.inArray(j[c],a);if(k!==-1&&k>1&&j[c]==a[k]){j[c]=k-2;h.h=r(j[c],h.h)}}if(j[c]!==
|
14
|
+
undefined)h[f[c].toLowerCase()]=parseInt(j[c],10)}h.m=parseInt(h.m,10)-1;c=h.y;if(c>=70&&c<=99)h.y=1900+h.y;else if(c>=0&&c<=69)h.y=2E3+h.y}return new Date(h.y,h.m,h.d,h.h,h.i,h.s,0)},jqID:function(f){return String(f).replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},guid:1,uidPref:"jqg",randId:function(f){return(f?f:b.jgrid.uidPref)+b.jgrid.guid++},getAccessor:function(f,j){var h,c,g=[],k;if(typeof j==="function")return j(f);h=f[j];if(h===undefined)try{if(typeof j==="string")g=j.split(".");
|
15
|
+
if(k=g.length)for(h=f;h&&k--;){c=g.shift();h=h[c]}}catch(l){}return h},ajaxOptions:{},from:function(f){return new function(j,h){if(typeof j=="string")j=b.data(j);var c=this,g=j,k=true,l=false,a=h,r=/[\$,%]/g,x=null,y=null,E=false,Q="",K=[],O=true;if(typeof j=="object"&&j.push){if(j.length>0)O=typeof j[0]!="object"?false:true}else throw"data provides is not an array";this._hasData=function(){return g===null?false:g.length===0?false:true};this._getStr=function(m){var o=[];l&&o.push("jQuery.trim(");
|
16
|
+
o.push("String("+m+")");l&&o.push(")");k||o.push(".toLowerCase()");return o.join("")};this._strComp=function(m){return typeof m=="string"?".toString()":""};this._group=function(m,o){return{field:m.toString(),unique:o,items:[]}};this._toStr=function(m){if(l)m=b.trim(m);k||(m=m.toLowerCase());return m=m.toString().replace(/\\/g,"\\\\").replace(/\"/g,'\\"')};this._funcLoop=function(m){var o=[];b.each(g,function(q,B){o.push(m(B))});return o};this._append=function(m){if(a===null)a="";else a+=Q===""?" && ":
|
17
|
+
Q;if(E)a+="!";a+="("+m+")";E=false;Q=""};this._setCommand=function(m,o){x=m;y=o};this._resetNegate=function(){E=false};this._repeatCommand=function(m,o){if(x===null)return c;if(m!==null&&o!==null)return x(m,o);if(y===null)return x(m);if(!O)return x(m);return x(y,m)};this._equals=function(m,o){return c._compare(m,o,1)===0};this._compare=function(m,o,q){if(q===undefined)q=1;if(m===undefined)m=null;if(o===undefined)o=null;if(m===null&&o===null)return 0;if(m===null&&o!==null)return 1;if(m!==null&&o===
|
18
|
+
null)return-1;if(!k&&typeof m!=="number"&&typeof o!=="number"){m=String(m).toLowerCase();o=String(o).toLowerCase()}if(m<o)return-q;if(m>o)return q;return 0};this._performSort=function(){if(K.length!==0)g=c._doSort(g,0)};this._doSort=function(m,o){var q=K[o].by,B=K[o].dir,T=K[o].type,J=K[o].datefmt;if(o==K.length-1)return c._getOrder(m,q,B,T,J);o++;q=c._getGroup(m,q,B,T,J);B=[];for(T=0;T<q.length;T++){J=c._doSort(q[T].items,o);for(var D=0;D<J.length;D++)B.push(J[D])}return B};this._getOrder=function(m,
|
19
|
+
o,q,B,T){var J=[],D=[],W=q=="a"?1:-1,U,ga;if(B===undefined)B="text";ga=B=="float"||B=="number"||B=="currency"||B=="numeric"?function(S){S=parseFloat(String(S).replace(r,""));return isNaN(S)?0:S}:B=="int"||B=="integer"?function(S){return S?parseFloat(String(S).replace(r,"")):0}:B=="date"||B=="datetime"?function(S){return b.jgrid.parseDate(T,S).getTime()}:b.isFunction(B)?B:function(S){S||(S="");return b.trim(String(S).toUpperCase())};b.each(m,function(S,aa){U=o!==""?b.jgrid.getAccessor(aa,o):aa;if(U===
|
20
|
+
undefined)U="";U=ga(U,aa);D.push({vSort:U,index:S})});D.sort(function(S,aa){S=S.vSort;aa=aa.vSort;return c._compare(S,aa,W)});B=0;for(var ca=m.length;B<ca;){q=D[B].index;J.push(m[q]);B++}return J};this._getGroup=function(m,o,q,B,T){var J=[],D=null,W=null,U;b.each(c._getOrder(m,o,q,B,T),function(ga,ca){U=b.jgrid.getAccessor(ca,o);if(U===undefined)U="";if(!c._equals(W,U)){W=U;D!==null&&J.push(D);D=c._group(o,U)}D.items.push(ca)});D!==null&&J.push(D);return J};this.ignoreCase=function(){k=false;return c};
|
21
|
+
this.useCase=function(){k=true;return c};this.trim=function(){l=true;return c};this.noTrim=function(){l=false;return c};this.execute=function(){var m=a,o=[];if(m===null)return c;b.each(g,function(){eval(m)&&o.push(this)});g=o;return c};this.data=function(){return g};this.select=function(m){c._performSort();if(!c._hasData())return[];c.execute();if(b.isFunction(m)){var o=[];b.each(g,function(q,B){o.push(m(B))});return o}return g};this.hasMatch=function(){if(!c._hasData())return false;c.execute();return g.length>
|
22
|
+
0};this.andNot=function(m,o,q){E=!E;return c.and(m,o,q)};this.orNot=function(m,o,q){E=!E;return c.or(m,o,q)};this.not=function(m,o,q){return c.andNot(m,o,q)};this.and=function(m,o,q){Q=" && ";if(m===undefined)return c;return c._repeatCommand(m,o,q)};this.or=function(m,o,q){Q=" || ";if(m===undefined)return c;return c._repeatCommand(m,o,q)};this.isNot=function(m){E=!E;return c.is(m)};this.is=function(m){c._append("this."+m);c._resetNegate();return c};this._compareValues=function(m,o,q,B,T){var J;J=
|
23
|
+
O?"jQuery.jgrid.getAccessor(this,'"+o+"')":"this";if(q===undefined)q=null;var D=q,W=T.stype===undefined?"text":T.stype;if(q!==null)switch(W){case "int":case "integer":D=isNaN(Number(D))||D===""?"0":D;J="parseInt("+J+",10)";D="parseInt("+D+",10)";break;case "float":case "number":case "numeric":D=String(D).replace(r,"");D=isNaN(Number(D))||D===""?"0":D;J="parseFloat("+J+")";D="parseFloat("+D+")";break;case "date":case "datetime":D=String(b.jgrid.parseDate(T.newfmt||"Y-m-d",D).getTime());J='jQuery.jgrid.parseDate("'+
|
24
|
+
T.srcfmt+'",'+J+").getTime()";break;default:J=c._getStr(J);D=c._getStr('"'+c._toStr(D)+'"')}c._append(J+" "+B+" "+D);c._setCommand(m,o);c._resetNegate();return c};this.equals=function(m,o,q){return c._compareValues(c.equals,m,o,"==",q)};this.notEquals=function(m,o,q){return c._compareValues(c.equals,m,o,"!==",q)};this.isNull=function(m,o,q){return c._compareValues(c.equals,m,null,"===",q)};this.greater=function(m,o,q){return c._compareValues(c.greater,m,o,">",q)};this.less=function(m,o,q){return c._compareValues(c.less,
|
25
|
+
m,o,"<",q)};this.greaterOrEquals=function(m,o,q){return c._compareValues(c.greaterOrEquals,m,o,">=",q)};this.lessOrEquals=function(m,o,q){return c._compareValues(c.lessOrEquals,m,o,"<=",q)};this.startsWith=function(m,o){var q=o===undefined||o===null?m:o;q=l?b.trim(q.toString()).length:q.toString().length;if(O)c._append(c._getStr("jQuery.jgrid.getAccessor(this,'"+m+"')")+".substr(0,"+q+") == "+c._getStr('"'+c._toStr(o)+'"'));else{q=l?b.trim(o.toString()).length:o.toString().length;c._append(c._getStr("this")+
|
26
|
+
".substr(0,"+q+") == "+c._getStr('"'+c._toStr(m)+'"'))}c._setCommand(c.startsWith,m);c._resetNegate();return c};this.endsWith=function(m,o){var q=o===undefined||o===null?m:o;q=l?b.trim(q.toString()).length:q.toString().length;O?c._append(c._getStr("jQuery.jgrid.getAccessor(this,'"+m+"')")+".substr("+c._getStr("jQuery.jgrid.getAccessor(this,'"+m+"')")+".length-"+q+","+q+') == "'+c._toStr(o)+'"'):c._append(c._getStr("this")+".substr("+c._getStr("this")+'.length-"'+c._toStr(m)+'".length,"'+c._toStr(m)+
|
27
|
+
'".length) == "'+c._toStr(m)+'"');c._setCommand(c.endsWith,m);c._resetNegate();return c};this.contains=function(m,o){O?c._append(c._getStr("jQuery.jgrid.getAccessor(this,'"+m+"')")+'.indexOf("'+c._toStr(o)+'",0) > -1'):c._append(c._getStr("this")+'.indexOf("'+c._toStr(m)+'",0) > -1');c._setCommand(c.contains,m);c._resetNegate();return c};this.groupBy=function(m,o,q,B){if(!c._hasData())return null;return c._getGroup(g,m,o,q,B)};this.orderBy=function(m,o,q,B){o=o===undefined||o===null?"a":b.trim(o.toString().toLowerCase());
|
28
|
+
if(q===null||q===undefined)q="text";if(B===null||B===undefined)B="Y-m-d";if(o=="desc"||o=="descending")o="d";if(o=="asc"||o=="ascending")o="a";K.push({by:m,dir:o,type:q,datefmt:B});return c};return c}(f,null)},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 j=b.jgrid.getAccessor(b.fn.jqGrid,f);if(!j)throw"jqGrid - No such method: "+f;var h=b.makeArray(arguments).slice(1);return j.apply(this,h)}return this.each(function(){if(!this.grid){var c=
|
29
|
+
b.extend(true,{url:"",height:150,page:1,rowNum:20,rowTotal:null,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,
|
30
|
+
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",
|
31
|
+
deloper:"del",subgridid:"id",npage:null,totalrows:"totalrows"},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,
|
32
|
+
"vertical",true],resizeclass:"",autoencode:false,remapColumns:[],ajaxGridOptions:{},direction:"ltr",toppager:false,headertitles:false,scrollTimeout:40,data:[],_index:{},grouping:false,groupingView:{groupField:[],groupOrder:[],groupText:[],groupColumnShow:[],groupSummary:[],showSummaryOnHide:false,sortitems:[],sortnames:[],groupDataSorted:false,summary:[],summaryval:[],plusicon:"ui-icon-circlesmall-plus",minusicon:"ui-icon-circlesmall-minus"},ignoreCase:false,cmTemplate:{}},b.jgrid.defaults,f||{}),
|
33
|
+
g={headers:[],cols:[],footers:[],dragStart:function(e,d,i){this.resizing={idx:e,startX:d.clientX,sOL:i[0]};this.hDiv.style.cursor="col-resize";this.curGbox=b("#rs_m"+b.jgrid.jqID(c.id),"#gbox_"+b.jgrid.jqID(c.id));this.curGbox.css({display:"block",left:i[0],top:i[1],height:i[2]});b.isFunction(c.resizeStart)&&c.resizeStart.call(this,d,e);document.onselectstart=function(){return false}},dragMove:function(e){if(this.resizing){var d=e.clientX-this.resizing.startX;e=this.headers[this.resizing.idx];var i=
|
34
|
+
c.direction==="ltr"?e.width+d:e.width-d,n;if(i>33){this.curGbox.css({left:this.resizing.sOL+d});if(c.forceFit===true){n=this.headers[this.resizing.idx+c.nv];d=c.direction==="ltr"?n.width-d:n.width+d;if(d>33){e.newWidth=i;n.newWidth=d}}else{this.newWidth=c.direction==="ltr"?c.tblwidth+d:c.tblwidth-d;e.newWidth=i}}}},dragEnd:function(){this.hDiv.style.cursor="default";if(this.resizing){var e=this.resizing.idx,d=this.headers[e].newWidth||this.headers[e].width;d=parseInt(d,10);this.resizing=false;b("#rs_m"+
|
35
|
+
b.jgrid.jqID(c.id)).css("display","none");c.colModel[e].width=d;this.headers[e].width=d;this.headers[e].el.style.width=d+"px";this.cols[e].style.width=d+"px";if(this.footers.length>0)this.footers[e].style.width=d+"px";if(c.forceFit===true){d=this.headers[e+c.nv].newWidth||this.headers[e+c.nv].width;this.headers[e+c.nv].width=d;this.headers[e+c.nv].el.style.width=d+"px";this.cols[e+c.nv].style.width=d+"px";if(this.footers.length>0)this.footers[e+c.nv].style.width=d+"px";c.colModel[e+c.nv].width=d}else{c.tblwidth=
|
36
|
+
this.newWidth||c.tblwidth;b("table:first",this.bDiv).css("width",c.tblwidth+"px");b("table:first",this.hDiv).css("width",c.tblwidth+"px");this.hDiv.scrollLeft=this.bDiv.scrollLeft;if(c.footerrow){b("table:first",this.sDiv).css("width",c.tblwidth+"px");this.sDiv.scrollLeft=this.bDiv.scrollLeft}}b.isFunction(c.resizeStop)&&c.resizeStop.call(this,d,e)}this.curGbox=null;document.onselectstart=function(){return true}},populateVisible:function(){g.timer&&clearTimeout(g.timer);g.timer=null;var e=b(g.bDiv).height();
|
37
|
+
if(e){var d=b("table:first",g.bDiv),i,n;if(d[0].rows.length)try{n=(i=d[0].rows[1])?b(i).outerHeight()||g.prevRowHeight:g.prevRowHeight}catch(p){n=g.prevRowHeight}if(n){g.prevRowHeight=n;var A=c.rowNum;i=g.scrollTop=g.bDiv.scrollTop;var s=Math.round(d.position().top)-i,F=s+d.height();n*=A;var t,z,v;if(F<e&&s<=0&&(c.lastpage===undefined||parseInt((F+i+n-1)/n,10)<=c.lastpage)){z=parseInt((e-F+n-1)/n,10);if(F>=0||z<2||c.scroll===true){t=Math.round((F+i)/n)+1;s=-1}else s=1}if(s>0){t=parseInt(i/n,10)+1;
|
38
|
+
z=parseInt((i+e)/n,10)+2-t;v=true}if(z)if(!(c.lastpage&&t>c.lastpage||c.lastpage==1||t===c.page&&t===c.lastpage))if(g.hDiv.loading)g.timer=setTimeout(g.populateVisible,c.scrollTimeout);else{c.page=t;if(v){g.selectionPreserver(d[0]);g.emptyRows(g.bDiv,false,false)}g.populate(z)}}}},scrollGrid:function(e){if(c.scroll){var d=g.bDiv.scrollTop;if(g.scrollTop===undefined)g.scrollTop=0;if(d!=g.scrollTop){g.scrollTop=d;g.timer&&clearTimeout(g.timer);g.timer=setTimeout(g.populateVisible,c.scrollTimeout)}}g.hDiv.scrollLeft=
|
39
|
+
g.bDiv.scrollLeft;if(c.footerrow)g.sDiv.scrollLeft=g.bDiv.scrollLeft;e&&e.stopPropagation()},selectionPreserver:function(e){var d=e.p,i=d.selrow,n=d.selarrrow?b.makeArray(d.selarrrow):null,p=e.grid.bDiv.scrollLeft,A=d.gridComplete;d.gridComplete=function(){d.selrow=null;d.selarrrow=[];if(d.multiselect&&n&&n.length>0)for(var s=0;s<n.length;s++)n[s]!=i&&b(e).jqGrid("setSelection",n[s],false);i&&b(e).jqGrid("setSelection",i,false);e.grid.bDiv.scrollLeft=p;d.gridComplete=A;d.gridComplete&&A()}}};if(this.tagName.toUpperCase()!=
|
40
|
+
"TABLE")alert("Element is not a table");else{b(this).empty().attr("tabindex","1");this.p=c;var k,l,a;if(this.p.colNames.length===0)for(k=0;k<this.p.colModel.length;k++)this.p.colNames[k]=this.p.colModel[k].label||this.p.colModel[k].name;if(this.p.colNames.length!==this.p.colModel.length)alert(b.jgrid.errors.model);else{var r=b("<div class='ui-jqgrid-view'></div>"),x,y=b.browser.msie?true:false,E=b.browser.webkit||b.browser.safari?true:false;a=this;a.p.direction=b.trim(a.p.direction.toLowerCase());
|
41
|
+
if(b.inArray(a.p.direction,["ltr","rtl"])==-1)a.p.direction="ltr";l=a.p.direction;b(r).insertBefore(this);b(this).appendTo(r).removeClass("scroll");var Q=b("<div class='ui-jqgrid ui-widget ui-widget-content ui-corner-all'></div>");b(Q).insertBefore(r).attr({id:"gbox_"+this.id,dir:l});b(r).appendTo(Q).attr("id","gview_"+this.id);x=y&&b.browser.version<=6?'<iframe style="display:block;position:absolute;z-index:-1;filter:Alpha(Opacity=\'0\');" src="javascript:false;"></iframe>':"";b("<div class='ui-widget-overlay jqgrid-overlay' id='lui_"+
|
42
|
+
this.id+"'></div>").append(x).insertBefore(r);b("<div class='loading ui-state-default ui-state-active' id='load_"+this.id+"'>"+this.p.loadtext+"</div>").insertBefore(r);b(this).attr({cellspacing:"0",cellpadding:"0",border:"0",role:"grid","aria-multiselectable":!!this.p.multiselect,"aria-labelledby":"gbox_"+this.id});var K=function(e,d){e=parseInt(e,10);return isNaN(e)?d?d:0:e},O=function(e,d,i,n,p,A){var s=a.p.colModel[e],F=s.align,t='style="',z=s.classes,v=s.name,u=[];if(F)t+="text-align:"+F+";";
|
43
|
+
if(s.hidden===true)t+="display:none;";if(d===0)t+="width: "+g.headers[e].width+"px;";else if(s.cellattr&&b.isFunction(s.cellattr))if((e=s.cellattr.call(a,p,i,n,s,A))&&typeof e==="string"){e=e.replace(/style/i,"style").replace(/title/i,"title");if(e.indexOf("title")>-1)s.title=false;if(e.indexOf("class")>-1)z=undefined;u=e.split("style");if(u.length===2){u[1]=b.trim(u[1].replace("=",""));if(u[1].indexOf("'")===0||u[1].indexOf('"')===0)u[1]=u[1].substring(1);t+=u[1].replace(/'/gi,'"')}else t+='"'}if(!u.length){u[0]=
|
44
|
+
"";t+='"'}t+=(z!==undefined?' class="'+z+'"':"")+(s.title&&i?' title="'+b.jgrid.stripHtml(i)+'"':"");t+=' aria-describedby="'+a.p.id+"_"+v+'"';return t+u[0]},m=function(e){return e===undefined||e===null||e===""?" ":a.p.autoencode?b.jgrid.htmlEncode(e):e+""},o=function(e,d,i,n,p){var A=a.p.colModel[i];if(typeof A.formatter!=="undefined"){e={rowId:e,colModel:A,gid:a.p.id,pos:i};d=b.isFunction(A.formatter)?A.formatter.call(a,d,e,n,p):b.fmatter?b.fn.fmatter(A.formatter,d,e,n,p):m(d)}else d=m(d);
|
45
|
+
return d},q=function(e,d,i,n,p){d=o(e,d,i,p,"add");return'<td role="gridcell" '+O(i,n,d,p,e,true)+">"+d+"</td>"},B=function(e,d,i){var n='<input role="checkbox" type="checkbox" id="jqg_'+a.p.id+"_"+e+'" class="cbox" name="jqg_'+a.p.id+"_"+e+'"/>';return'<td role="gridcell" '+O(d,i,"",null,e,true)+">"+n+"</td>"},T=function(e,d,i,n){i=(parseInt(i,10)-1)*parseInt(n,10)+1+d;return'<td role="gridcell" class="ui-state-default jqgrid-rownum" '+O(e,d,i,null,d,true)+">"+i+"</td>"},J=function(e){var d,i=[],
|
46
|
+
n=0,p;for(p=0;p<a.p.colModel.length;p++){d=a.p.colModel[p];if(d.name!=="cb"&&d.name!=="subgrid"&&d.name!=="rn"){i[n]=e=="local"?d.name:e=="xml"?d.xmlmap||d.name:d.jsonmap||d.name;n++}}return i},D=function(e){var d=a.p.remapColumns;if(!d||!d.length)d=b.map(a.p.colModel,function(i,n){return n});if(e)d=b.map(d,function(i){return i<e?null:i-e});return d},W=function(e,d,i){if(a.p.deepempty)b("#"+b.jgrid.jqID(a.p.id)+" tbody:first tr:gt(0)").remove();else{var n=b("#"+b.jgrid.jqID(a.p.id)+" tbody:first tr:first")[0];
|
47
|
+
b("#"+b.jgrid.jqID(a.p.id)+" tbody:first").empty().append(n)}if(d&&a.p.scroll){b(">div:first",e).css({height:"auto"}).children("div:first").css({height:0,display:"none"});e.scrollTop=0}if(i===true)if(a.p.treeGrid===true){a.p.data=[];a.p._index={}}},U=function(){var e=a.p.data.length,d,i,n;d=a.p.rownumbers===true?1:0;i=a.p.multiselect===true?1:0;n=a.p.subGrid===true?1:0;d=a.p.keyIndex===false||a.p.loadonce===true?a.p.localReader.id:a.p.colModel[a.p.keyIndex+i+n+d].name;for(i=0;i<e;i++){n=b.jgrid.getAccessor(a.p.data[i],
|
48
|
+
d);a.p._index[n]=i}},ga=function(e,d,i,n,p){var A=new Date,s=a.p.datatype!="local"&&a.p.loadonce||a.p.datatype=="xmlstring",F=a.p.datatype=="local"?"local":"xml";if(s){a.p.data=[];a.p._index={};a.p.localReader.id="_id_"}a.p.reccount=0;if(b.isXMLDoc(e)){if(a.p.treeANode===-1&&!a.p.scroll){W(d,false,true);i=1}else i=i>1?i:1;var t,z,v=0,u,G=0,R=0,M=0,L,N=[],Y,I={},w,C,H=[],ha=a.p.altRows===true?" "+a.p.altclass:"";a.p.xmlReader.repeatitems||(N=J(F));L=a.p.keyIndex===false?a.p.xmlReader.id:a.p.keyIndex;
|
49
|
+
if(N.length>0&&!isNaN(L)){if(a.p.remapColumns&&a.p.remapColumns.length)L=b.inArray(L,a.p.remapColumns);L=N[L]}F=(L+"").indexOf("[")===-1?N.length?function(ea,$){return b(L,ea).text()||$}:function(ea,$){return b(a.p.xmlReader.cell,ea).eq(L).text()||$}:function(ea,$){return ea.getAttribute(L.replace(/[\[\]]/g,""))||$};a.p.userData={};b(a.p.xmlReader.page,e).each(function(){a.p.page=this.textContent||this.text||0});b(a.p.xmlReader.total,e).each(function(){a.p.lastpage=this.textContent||this.text;if(a.p.lastpage===
|
50
|
+
undefined)a.p.lastpage=1});b(a.p.xmlReader.records,e).each(function(){a.p.records=this.textContent||this.text||0});b(a.p.xmlReader.userdata,e).each(function(){a.p.userData[this.getAttribute("name")]=this.textContent||this.text});(e=b(a.p.xmlReader.root+" "+a.p.xmlReader.row,e))||(e=[]);var V=e.length,Z=0,ia={},fa;if(e&&V){fa=parseInt(a.p.rowNum,10);var ra=a.p.scroll?b.jgrid.randId():1;if(p)fa*=p+1;p=b.isFunction(a.p.afterInsertRow);var oa="";if(a.p.grouping&&a.p.groupingView.groupCollapse===true)oa=
|
51
|
+
' style="display:none;"';for(;Z<V;){w=e[Z];C=F(w,ra+Z);t=i===0?0:i+1;t=(t+Z)%2==1?ha:"";H.push("<tr"+oa+' id="'+C+'" tabindex="-1" role="row" class ="ui-widget-content jqgrow ui-row-'+a.p.direction+""+t+'">');if(a.p.rownumbers===true){H.push(T(0,Z,a.p.page,a.p.rowNum));M=1}if(a.p.multiselect===true){H.push(B(C,M,Z));G=1}if(a.p.subGrid===true){H.push(b(a).jqGrid("addSubGridCell",G+M,Z+i));R=1}if(a.p.xmlReader.repeatitems){Y||(Y=D(G+R+M));var Ba=b(a.p.xmlReader.cell,w);b.each(Y,function(ea){var $=Ba[this];
|
52
|
+
if(!$)return false;u=$.textContent||$.text;I[a.p.colModel[ea+G+R+M].name]=u;H.push(q(C,u,ea+G+R+M,Z+i,w))})}else for(t=0;t<N.length;t++){u=b(N[t],w).text();I[a.p.colModel[t+G+R+M].name]=u;H.push(q(C,u,t+G+R+M,Z+i,w))}H.push("</tr>");if(a.p.grouping){t=a.p.groupingView.groupField.length;for(var xa=[],ya=0;ya<t;ya++)xa.push(I[a.p.groupingView.groupField[ya]]);ia=b(a).jqGrid("groupingPrepare",H,xa,ia,I);H=[]}if(s||a.p.treeGrid===true){I._id_=C;a.p.data.push(I);a.p._index[C]=a.p.data.length-1}if(a.p.gridview===
|
53
|
+
false){b("tbody:first",d).append(H.join(""));p&&a.p.afterInsertRow.call(a,C,I,w);H=[]}I={};v++;Z++;if(v==fa)break}}if(a.p.gridview===true){z=a.p.treeANode>-1?a.p.treeANode:0;if(a.p.grouping){b(a).jqGrid("groupingRender",ia,a.p.colModel.length);ia=null}else a.p.treeGrid===true&&z>0?b(a.rows[z]).after(H.join("")):b("tbody:first",d).append(H.join(""))}if(a.p.subGrid===true)try{b(a).jqGrid("addSubGrid",G+M)}catch(Ha){}a.p.totaltime=new Date-A;if(v>0)if(a.p.records===0)a.p.records=V;H=null;if(a.p.treeGrid===
|
54
|
+
true)try{b(a).jqGrid("setTreeNode",z+1,v+z+1)}catch(Ia){}if(!a.p.treeGrid&&!a.p.scroll)a.grid.bDiv.scrollTop=0;a.p.reccount=v;a.p.treeANode=-1;a.p.userDataOnFooter&&b(a).jqGrid("footerData","set",a.p.userData,true);if(s){a.p.records=V;a.p.lastpage=Math.ceil(V/fa)}n||a.updatepager(false,true);if(s)for(;v<V;){w=e[v];C=F(w,v);if(a.p.xmlReader.repeatitems){Y||(Y=D(G+R+M));var Ea=b(a.p.xmlReader.cell,w);b.each(Y,function(ea){var $=Ea[this];if(!$)return false;u=$.textContent||$.text;I[a.p.colModel[ea+G+
|
55
|
+
R+M].name]=u})}else for(t=0;t<N.length;t++){u=b(N[t],w).text();I[a.p.colModel[t+G+R+M].name]=u}I._id_=C;a.p.data.push(I);a.p._index[C]=a.p.data.length-1;I={};v++}}},ca=function(e,d,i,n,p){var A=new Date;if(e){if(a.p.treeANode===-1&&!a.p.scroll){W(d,false,true);i=1}else i=i>1?i:1;var s,F=a.p.datatype!="local"&&a.p.loadonce||a.p.datatype=="jsonstring";if(F){a.p.data=[];a.p._index={};a.p.localReader.id="_id_"}a.p.reccount=0;if(a.p.datatype=="local"){d=a.p.localReader;s="local"}else{d=a.p.jsonReader;
|
56
|
+
s="json"}var t=0,z,v,u=[],G,R=0,M=0,L=0,N,Y,I={},w,C,H=[],ha=a.p.altRows===true?" "+a.p.altclass:"";a.p.page=b.jgrid.getAccessor(e,d.page)||0;N=b.jgrid.getAccessor(e,d.total);a.p.lastpage=N===undefined?1:N;a.p.records=b.jgrid.getAccessor(e,d.records)||0;a.p.userData=b.jgrid.getAccessor(e,d.userdata)||{};d.repeatitems||(G=u=J(s));s=a.p.keyIndex===false?d.id:a.p.keyIndex;if(u.length>0&&!isNaN(s)){if(a.p.remapColumns&&a.p.remapColumns.length)s=b.inArray(s,a.p.remapColumns);s=u[s]}(Y=b.jgrid.getAccessor(e,
|
57
|
+
d.root))||(Y=[]);N=Y.length;e=0;var V=parseInt(a.p.rowNum,10),Z=a.p.scroll?b.jgrid.randId():1;if(p)V*=p+1;var ia=b.isFunction(a.p.afterInsertRow),fa={},ra="";if(a.p.grouping&&a.p.groupingView.groupCollapse===true)ra=' style="display:none;"';for(;e<N;){p=Y[e];C=b.jgrid.getAccessor(p,s);if(C===undefined){C=Z+e;if(u.length===0)if(d.cell)C=b.jgrid.getAccessor(p,d.cell)[s]||C}z=i===1?0:i;z=(z+e)%2==1?ha:"";H.push("<tr"+ra+' id="'+C+'" tabindex="-1" role="row" class= "ui-widget-content jqgrow ui-row-'+
|
58
|
+
a.p.direction+""+z+'">');if(a.p.rownumbers===true){H.push(T(0,e,a.p.page,a.p.rowNum));L=1}if(a.p.multiselect){H.push(B(C,L,e));R=1}if(a.p.subGrid){H.push(b(a).jqGrid("addSubGridCell",R+L,e+i));M=1}if(d.repeatitems){if(d.cell)p=b.jgrid.getAccessor(p,d.cell);G||(G=D(R+M+L))}for(v=0;v<G.length;v++){z=b.jgrid.getAccessor(p,G[v]);H.push(q(C,z,v+R+M+L,e+i,p));I[a.p.colModel[v+R+M+L].name]=z}H.push("</tr>");if(a.p.grouping){z=a.p.groupingView.groupField.length;v=[];for(var oa=0;oa<z;oa++)v.push(I[a.p.groupingView.groupField[oa]]);
|
59
|
+
fa=b(a).jqGrid("groupingPrepare",H,v,fa,I);H=[]}if(F||a.p.treeGrid===true){I._id_=C;a.p.data.push(I);a.p._index[C]=a.p.data.length-1}if(a.p.gridview===false){b("#"+b.jgrid.jqID(a.p.id)+" tbody:first").append(H.join(""));ia&&a.p.afterInsertRow.call(a,C,I,p);H=[]}I={};t++;e++;if(t==V)break}if(a.p.gridview===true){w=a.p.treeANode>-1?a.p.treeANode:0;if(a.p.grouping)b(a).jqGrid("groupingRender",fa,a.p.colModel.length);else a.p.treeGrid===true&&w>0?b(a.rows[w]).after(H.join("")):b("#"+b.jgrid.jqID(a.p.id)+
|
60
|
+
" tbody:first").append(H.join(""))}if(a.p.subGrid===true)try{b(a).jqGrid("addSubGrid",R+L)}catch(Ba){}a.p.totaltime=new Date-A;if(t>0)if(a.p.records===0)a.p.records=N;if(a.p.treeGrid===true)try{b(a).jqGrid("setTreeNode",w+1,t+w+1)}catch(xa){}if(!a.p.treeGrid&&!a.p.scroll)a.grid.bDiv.scrollTop=0;a.p.reccount=t;a.p.treeANode=-1;a.p.userDataOnFooter&&b(a).jqGrid("footerData","set",a.p.userData,true);if(F){a.p.records=N;a.p.lastpage=Math.ceil(N/V)}n||a.updatepager(false,true);if(F)for(;t<N&&Y[t];){p=
|
61
|
+
Y[t];C=b.jgrid.getAccessor(p,s);if(C===undefined){C=Z+t;if(u.length===0)if(d.cell)C=b.jgrid.getAccessor(p,d.cell)[s]||C}if(p){if(d.repeatitems){if(d.cell)p=b.jgrid.getAccessor(p,d.cell);G||(G=D(R+M+L))}for(v=0;v<G.length;v++){z=b.jgrid.getAccessor(p,G[v]);I[a.p.colModel[v+R+M+L].name]=z}I._id_=C;a.p.data.push(I);a.p._index[C]=a.p.data.length-1;I={}}t++}}},S=function(){function e(w){var C=0,H,ha,V;if(w.groups!==undefined)for(H=0;H<w.groups.length;H++){try{e(w.groups[H])}catch(Z){alert(Z)}C++}if(w.rules!==
|
62
|
+
undefined){if(C>0){var ia=u.select();u=b.jgrid.from(ia)}try{for(H=0;H<w.rules.length;H++){V=w.rules[H];ha=w.groupOp.toString().toUpperCase();if(v[V.op]&&V.field){if(C>0&&ha&&ha==="OR")u=u.or();u=v[V.op](u,ha)(V.field,V.data,n[V.field])}C++}}catch(fa){alert(fa)}}}var d,i=false,n={},p=[],A=[],s,F,t;if(b.isArray(a.p.data)){var z=a.p.grouping?a.p.groupingView:false;b.each(a.p.colModel,function(){F=this.sorttype||"text";if(F=="date"||F=="datetime"){if(this.formatter&&typeof this.formatter==="string"&&
|
63
|
+
this.formatter=="date"){s=this.formatoptions&&this.formatoptions.srcformat?this.formatoptions.srcformat:b.jgrid.formatter.date.srcformat;t=this.formatoptions&&this.formatoptions.newformat?this.formatoptions.newformat:b.jgrid.formatter.date.newformat}else s=t=this.datefmt||"Y-m-d";n[this.name]={stype:F,srcfmt:s,newfmt:t}}else n[this.name]={stype:F,srcfmt:"",newfmt:""};if(a.p.grouping&&this.name==z.groupField[0]){var w=this.name;if(typeof this.index!="undefined")w=this.index;p[0]=n[w];A.push(w)}if(!i&&
|
64
|
+
(this.index==a.p.sortname||this.name==a.p.sortname)){d=this.name;i=true}});if(a.p.treeGrid)b(a).jqGrid("SortTree",d,a.p.sortorder,n[d].stype,n[d].srcfmt);else{var v={eq:function(w){return w.equals},ne:function(w){return w.notEquals},lt:function(w){return w.less},le:function(w){return w.lessOrEquals},gt:function(w){return w.greater},ge:function(w){return w.greaterOrEquals},cn:function(w){return w.contains},nc:function(w,C){return C==="OR"?w.orNot().contains:w.andNot().contains},bw:function(w){return w.startsWith},
|
65
|
+
bn:function(w,C){return C==="OR"?w.orNot().startsWith:w.andNot().startsWith},en:function(w,C){return C==="OR"?w.orNot().endsWith:w.andNot().endsWith},ew:function(w){return w.endsWith},ni:function(w,C){return C==="OR"?w.orNot().equals:w.andNot().equals},"in":function(w){return w.equals},nu:function(w){return w.isNull},nn:function(w,C){return C==="OR"?w.orNot().isNull:w.andNot().isNull}},u=b.jgrid.from(a.p.data);if(a.p.ignoreCase)u=u.ignoreCase();if(a.p.search===true){var G=a.p.postData.filters;if(G){if(typeof G==
|
66
|
+
"string")G=b.jgrid.parse(G);e(G)}else try{u=v[a.p.postData.searchOper](u)(a.p.postData.searchField,a.p.postData.searchString,n[a.p.postData.searchField])}catch(R){}}if(a.p.grouping){u.orderBy(A,z.groupOrder[0],p[0].stype,p[0].srcfmt);z.groupDataSorted=true}if(d&&a.p.sortorder&&i)a.p.sortorder.toUpperCase()=="DESC"?u.orderBy(a.p.sortname,"d",n[d].stype,n[d].srcfmt):u.orderBy(a.p.sortname,"a",n[d].stype,n[d].srcfmt);G=u.select();var M=parseInt(a.p.rowNum,10),L=G.length,N=parseInt(a.p.page,10),Y=Math.ceil(L/
|
67
|
+
M),I={};G=G.slice((N-1)*M,N*M);n=u=null;I[a.p.localReader.total]=Y;I[a.p.localReader.page]=N;I[a.p.localReader.records]=L;I[a.p.localReader.root]=G;G=null;return I}}},aa=function(){a.grid.hDiv.loading=true;if(!a.p.hiddengrid)switch(a.p.loadui){case "enable":b("#load_"+b.jgrid.jqID(a.p.id)).show();break;case "block":b("#lui_"+b.jgrid.jqID(a.p.id)).show();b("#load_"+b.jgrid.jqID(a.p.id)).show()}},pa=function(){a.grid.hDiv.loading=false;switch(a.p.loadui){case "enable":b("#load_"+b.jgrid.jqID(a.p.id)).hide();
|
68
|
+
break;case "block":b("#lui_"+b.jgrid.jqID(a.p.id)).hide();b("#load_"+b.jgrid.jqID(a.p.id)).hide()}},ja=function(e){if(!a.grid.hDiv.loading){var d=a.p.scroll&&e===false,i={},n,p=a.p.prmNames;if(a.p.page<=0)a.p.page=1;if(p.search!==null)i[p.search]=a.p.search;if(p.nd!==null)i[p.nd]=(new Date).getTime();if(p.rows!==null)i[p.rows]=a.p.rowNum;if(p.page!==null)i[p.page]=a.p.page;if(p.sort!==null)i[p.sort]=a.p.sortname;if(p.order!==null)i[p.order]=a.p.sortorder;if(a.p.rowTotal!==null&&p.totalrows!==null)i[p.totalrows]=
|
69
|
+
a.p.rowTotal;var A=a.p.loadComplete,s=b.isFunction(A);s||(A=null);var F=0;e=e||1;if(e>1)if(p.npage!==null){i[p.npage]=e;F=e-1;e=1}else A=function(z){a.p.page++;a.grid.hDiv.loading=false;s&&a.p.loadComplete.call(a,z);ja(e-1)};else p.npage!==null&&delete a.p.postData[p.npage];if(a.p.grouping){b(a).jqGrid("groupingSetup");if(a.p.groupingView.groupDataSorted===true)i[p.sort]=a.p.groupingView.groupField[0]+" "+a.p.groupingView.groupOrder[0]+", "+i[p.sort]}b.extend(a.p.postData,i);var t=!a.p.scroll?1:a.rows.length-
|
70
|
+
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);n=a.p.datatype.toLowerCase();switch(n){case "json":case "jsonp":case "xml":case "script":b.ajax(b.extend({url:a.p.url,type:a.p.mtype,dataType:n,data:b.isFunction(a.p.serializeGridData)?a.p.serializeGridData.call(a,a.p.postData):a.p.postData,success:function(z){n==="xml"?ga(z,a.grid.bDiv,t,e>1,F):ca(z,a.grid.bDiv,t,e>1,F);A&&A.call(a,z);d&&a.grid.populateVisible();
|
71
|
+
if(a.p.loadonce||a.p.treeGrid)a.p.datatype="local";pa()},error:function(z,v,u){b.isFunction(a.p.loadError)&&a.p.loadError.call(a,z,v,u);pa()},beforeSend:function(z){aa();b.isFunction(a.p.loadBeforeSend)&&a.p.loadBeforeSend.call(a,z)}},b.jgrid.ajaxOptions,a.p.ajaxGridOptions));break;case "xmlstring":aa();i=b.jgrid.stringToDoc(a.p.datastr);ga(i,a.grid.bDiv);s&&a.p.loadComplete.call(a,i);a.p.datatype="local";a.p.datastr=null;pa();break;case "jsonstring":aa();i=typeof a.p.datastr=="string"?b.jgrid.parse(a.p.datastr):
|
72
|
+
a.p.datastr;ca(i,a.grid.bDiv);s&&a.p.loadComplete.call(a,i);a.p.datatype="local";a.p.datastr=null;pa();break;case "local":case "clientside":aa();a.p.datatype="local";i=S();ca(i,a.grid.bDiv,t,e>1,F);A&&A.call(a,i);d&&a.grid.populateVisible();pa()}}}};x=function(e,d){var i="",n="<table cellspacing='0' cellpadding='0' border='0' style='table-layout:auto;' class='ui-pg-table'><tbody><tr>",p="",A,s,F,t,z=function(v){var u;if(b.isFunction(a.p.onPaging))u=a.p.onPaging.call(a,v);a.p.selrow=null;if(a.p.multiselect){a.p.selarrrow=
|
73
|
+
[];b("#cb_"+b.jgrid.jqID(a.p.id),a.grid.hDiv).attr("checked",false)}a.p.savedRow=[];if(u=="stop")return false;return true};e=e.substr(1);d+="_"+e;A="pg_"+e;s=e+"_left";F=e+"_center";t=e+"_right";b("#"+b.jgrid.jqID(e)).append("<div id='"+A+"' class='ui-pager-control' role='group'><table cellspacing='0' cellpadding='0' border='0' class='ui-pg-table' style='width:100%;table-layout:fixed;height:100%;' role='row'><tbody><tr><td id='"+s+"' align='left'></td><td id='"+F+"' align='center' style='white-space:pre;'></td><td id='"+
|
74
|
+
t+"' align='right'></td></tr></tbody></table></div>").attr("dir","ltr");if(a.p.rowList.length>0){p="<td dir='"+l+"'>";p+="<select class='ui-pg-selbox' role='listbox'>";for(s=0;s<a.p.rowList.length;s++)p+='<option role="option" value="'+a.p.rowList[s]+'"'+(a.p.rowNum==a.p.rowList[s]?' selected="selected"':"")+">"+a.p.rowList[s]+"</option>";p+="</select></td>"}if(l=="rtl")n+=p;if(a.p.pginput===true)i="<td dir='"+l+"'>"+b.jgrid.format(a.p.pgtext||"","<input class='ui-pg-input' type='text' size='2' maxlength='7' value='0' role='textbox'/>",
|
75
|
+
"<span id='sp_1_"+b.jgrid.jqID(e)+"'></span>")+"</td>";if(a.p.pgbuttons===true){s=["first"+d,"prev"+d,"next"+d,"last"+d];l=="rtl"&&s.reverse();n+="<td id='"+s[0]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-first'></span></td>";n+="<td id='"+s[1]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-prev'></span></td>";n+=i!==""?"<td class='ui-pg-button ui-state-disabled' style='width:4px;'><span class='ui-separator'></span></td>"+i+"<td class='ui-pg-button ui-state-disabled' style='width:4px;'><span class='ui-separator'></span></td>":
|
76
|
+
"";n+="<td id='"+s[2]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-next'></span></td>";n+="<td id='"+s[3]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-end'></span></td>"}else if(i!=="")n+=i;if(l=="ltr")n+=p;n+="</tr></tbody></table>";a.p.viewrecords===true&&b("td#"+e+"_"+a.p.recordpos,"#"+A).append("<div dir='"+l+"' style='text-align:"+a.p.recordpos+"' class='ui-paging-info'></div>");b("td#"+e+"_"+a.p.pagerpos,"#"+A).append(n);p=b(".ui-jqgrid").css("font-size")||
|
77
|
+
"11px";b(document.body).append("<div id='testpg' class='ui-jqgrid ui-widget ui-widget-content' style='font-size:"+p+";visibility:hidden;' ></div>");n=b(n).clone().appendTo("#testpg").width();b("#testpg").remove();if(n>0){if(i!=="")n+=50;b("td#"+e+"_"+a.p.pagerpos,"#"+A).width(n)}a.p._nvtd=[];a.p._nvtd[0]=n?Math.floor((a.p.width-n)/2):Math.floor(a.p.width/3);a.p._nvtd[1]=0;n=null;b(".ui-pg-selbox","#"+A).bind("change",function(){a.p.page=Math.round(a.p.rowNum*(a.p.page-1)/this.value-0.5)+1;a.p.rowNum=
|
78
|
+
this.value;if(d)b(".ui-pg-selbox",a.p.pager).val(this.value);else a.p.toppager&&b(".ui-pg-selbox",a.p.toppager).val(this.value);if(!z("records"))return false;ja();return false});if(a.p.pgbuttons===true){b(".ui-pg-button","#"+A).hover(function(){if(b(this).hasClass("ui-state-disabled"))this.style.cursor="default";else{b(this).addClass("ui-state-hover");this.style.cursor="pointer"}},function(){if(!b(this).hasClass("ui-state-disabled")){b(this).removeClass("ui-state-hover");this.style.cursor="default"}});
|
79
|
+
b("#first"+b.jgrid.jqID(d)+", #prev"+b.jgrid.jqID(d)+", #next"+b.jgrid.jqID(d)+", #last"+b.jgrid.jqID(d)).click(function(){var v=K(a.p.page,1),u=K(a.p.lastpage,1),G=false,R=true,M=true,L=true,N=true;if(u===0||u===1)N=L=M=R=false;else if(u>1&&v>=1)if(v===1)M=R=false;else{if(!(v>1&&v<u))if(v===u)N=L=false}else if(u>1&&v===0){N=L=false;v=u-1}if(this.id==="first"+d&&R){a.p.page=1;G=true}if(this.id==="prev"+d&&M){a.p.page=v-1;G=true}if(this.id==="next"+d&&L){a.p.page=v+1;G=true}if(this.id==="last"+d&&
|
80
|
+
N){a.p.page=u;G=true}if(G){if(!z(this.id))return false;ja()}return false})}a.p.pginput===true&&b("input.ui-pg-input","#"+A).keypress(function(v){if((v.charCode?v.charCode:v.keyCode?v.keyCode:0)==13){a.p.page=b(this).val()>0?b(this).val():a.p.page;if(!z("user"))return false;ja();return false}return this})};var Ca=function(e,d,i,n){if(a.p.colModel[d].sortable)if(!(a.p.savedRow.length>0)){if(!i){if(a.p.lastsort==d)if(a.p.sortorder=="asc")a.p.sortorder="desc";else{if(a.p.sortorder=="desc")a.p.sortorder=
|
81
|
+
"asc"}else a.p.sortorder=a.p.colModel[d].firstsortorder||"asc";a.p.page=1}if(n)if(a.p.lastsort==d&&a.p.sortorder==n&&!i)return;else a.p.sortorder=n;i=b("thead:first",a.grid.hDiv).get(0);b("tr th:eq("+a.p.lastsort+") span.ui-grid-ico-sort",i).addClass("ui-state-disabled");b("tr th:eq("+a.p.lastsort+")",i).attr("aria-selected","false");b("tr th:eq("+d+") span.ui-icon-"+a.p.sortorder,i).removeClass("ui-state-disabled");b("tr th:eq("+d+")",i).attr("aria-selected","true");if(!a.p.viewsortcols[0])if(a.p.lastsort!=
|
82
|
+
d){b("tr th:eq("+a.p.lastsort+") span.s-ico",i).hide();b("tr th:eq("+d+") span.s-ico",i).show()}e=e.substring(5);a.p.sortname=a.p.colModel[d].index||e;i=a.p.sortorder;if(b.isFunction(a.p.onSortCol))if(a.p.onSortCol.call(a,e,d,i)=="stop"){a.p.lastsort=d;return}if(a.p.datatype=="local")a.p.deselectAfterSort&&b(a).jqGrid("resetSelection");else{a.p.selrow=null;a.p.multiselect&&b("#cb_"+b.jgrid.jqID(a.p.id),a.grid.hDiv).attr("checked",false);a.p.selarrrow=[];a.p.savedRow=[]}if(a.p.scroll){i=a.grid.bDiv.scrollLeft;
|
83
|
+
W(a.grid.bDiv,true,false);a.grid.hDiv.scrollLeft=i}a.p.subGrid&&a.p.datatype=="local"&&b("td.sgexpanded","#"+b.jgrid.jqID(a.p.id)).each(function(){b(this).trigger("click")});ja();a.p.lastsort=d;if(a.p.sortname!=e&&d)a.p.lastsort=d}},Fa=function(e){var d,i={},n=E?0:a.p.cellLayout;for(d=i[0]=i[1]=i[2]=0;d<=e;d++)if(a.p.colModel[d].hidden===false)i[0]+=a.p.colModel[d].width+n;if(a.p.direction=="rtl")i[0]=a.p.width-i[0];i[0]-=a.grid.bDiv.scrollLeft;if(b(a.grid.cDiv).is(":visible"))i[1]+=b(a.grid.cDiv).height()+
|
84
|
+
parseInt(b(a.grid.cDiv).css("padding-top"),10)+parseInt(b(a.grid.cDiv).css("padding-bottom"),10);if(a.p.toolbar[0]===true&&(a.p.toolbar[1]=="top"||a.p.toolbar[1]=="both"))i[1]+=b(a.grid.uDiv).height()+parseInt(b(a.grid.uDiv).css("border-top-width"),10)+parseInt(b(a.grid.uDiv).css("border-bottom-width"),10);if(a.p.toppager)i[1]+=b(a.grid.topDiv).height()+parseInt(b(a.grid.topDiv).css("border-bottom-width"),10);i[2]+=b(a.grid.bDiv).height()+b(a.grid.hDiv).height();return i};this.p.id=this.id;if(b.inArray(a.p.multikey,
|
85
|
+
["shiftKey","altKey","ctrlKey"])==-1)a.p.multikey=false;a.p.keyIndex=false;for(k=0;k<a.p.colModel.length;k++){a.p.colModel[k]=b.extend(true,{},a.p.cmTemplate,a.p.colModel[k].template||{},a.p.colModel[k]);if(a.p.keyIndex===false&&a.p.colModel[k].key===true)a.p.keyIndex=k}a.p.sortorder=a.p.sortorder.toLowerCase();if(a.p.grouping===true){a.p.scroll=false;a.p.rownumbers=false;a.p.subGrid=false;a.p.treeGrid=false;a.p.gridview=true}if(this.p.treeGrid===true){try{b(this).jqGrid("setTreeGrid")}catch(Ja){}if(a.p.datatype!=
|
86
|
+
"local")a.p.localReader={id:"_id_"}}if(this.p.subGrid)try{b(a).jqGrid("setSubGrid")}catch(Ka){}if(this.p.multiselect){this.p.colNames.unshift("<input role='checkbox' id='cb_"+this.p.id+"' class='cbox' type='checkbox'/>");this.p.colModel.unshift({name:"cb",width:E?a.p.multiselectWidth+a.p.cellLayout:a.p.multiselectWidth,sortable:false,resizable:false,hidedlg:true,search:false,align:"center",fixed:true})}if(this.p.rownumbers){this.p.colNames.unshift("");this.p.colModel.unshift({name:"rn",width:a.p.rownumWidth,
|
87
|
+
sortable:false,resizable:false,hidedlg:true,search:false,align:"center",fixed:true})}a.p.xmlReader=b.extend(true,{root:"rows",row:"row",page:"rows>page",total:"rows>total",records:"rows>records",repeatitems:true,cell:"cell",id:"[id]",userdata:"userdata",subgrid:{root:"rows",row:"row",repeatitems:true,cell:"cell"}},a.p.xmlReader);a.p.jsonReader=b.extend(true,{root:"rows",page:"page",total:"total",records:"records",repeatitems:true,cell:"cell",id:"id",userdata:"userdata",subgrid:{root:"rows",repeatitems:true,
|
88
|
+
cell:"cell"}},a.p.jsonReader);a.p.localReader=b.extend(true,{root:"rows",page:"page",total:"total",records:"records",repeatitems:false,cell:"cell",id:"id",userdata:"userdata",subgrid:{root:"rows",repeatitems:true,cell:"cell"}},a.p.localReader);if(a.p.scroll){a.p.pgbuttons=false;a.p.pginput=false;a.p.rowList=[]}a.p.data.length&&U();var ba="<thead><tr class='ui-jqgrid-labels' role='rowheader'>",Da,ma,sa,qa,ta,X,P,na;ma=na="";if(a.p.shrinkToFit===true&&a.p.forceFit===true)for(k=a.p.colModel.length-1;k>=
|
89
|
+
0;k--)if(!a.p.colModel[k].hidden){a.p.colModel[k].resizable=false;break}if(a.p.viewsortcols[1]=="horizontal"){na=" ui-i-asc";ma=" ui-i-desc"}Da=y?"class='ui-th-div-ie'":"";na="<span class='s-ico' style='display:none'><span sort='asc' class='ui-grid-ico-sort ui-icon-asc"+na+" ui-state-disabled ui-icon ui-icon-triangle-1-n ui-sort-"+l+"'></span>";na+="<span sort='desc' class='ui-grid-ico-sort ui-icon-desc"+ma+" ui-state-disabled ui-icon ui-icon-triangle-1-s ui-sort-"+l+"'></span></span>";for(k=0;k<
|
90
|
+
this.p.colNames.length;k++){ma=a.p.headertitles?' title="'+b.jgrid.stripHtml(a.p.colNames[k])+'"':"";ba+="<th id='"+a.p.id+"_"+a.p.colModel[k].name+"' role='columnheader' class='ui-state-default ui-th-column ui-th-"+l+"'"+ma+">";ma=a.p.colModel[k].index||a.p.colModel[k].name;ba+="<div id='jqgh_"+a.p.id+"_"+a.p.colModel[k].name+"' "+Da+">"+a.p.colNames[k];a.p.colModel[k].width=a.p.colModel[k].width?parseInt(a.p.colModel[k].width,10):150;if(typeof a.p.colModel[k].title!=="boolean")a.p.colModel[k].title=
|
91
|
+
true;if(ma==a.p.sortname)a.p.lastsort=k;ba+=na+"</div></th>"}ba+="</tr></thead>";na=null;b(this).append(ba);b("thead tr:first th",this).hover(function(){b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")});if(this.p.multiselect){var za=[],ua;b("#cb_"+b.jgrid.jqID(a.p.id),this).bind("click",function(){a.p.selarrrow=[];if(this.checked){b(a.rows).each(function(e){if(e>0)if(!b(this).hasClass("subgrid")&&!b(this).hasClass("jqgroup")&&!b(this).hasClass("ui-state-disabled")){b("#jqg_"+
|
92
|
+
b.jgrid.jqID(a.p.id)+"_"+b.jgrid.jqID(this.id)).attr("checked","checked");b(this).addClass("ui-state-highlight").attr("aria-selected","true");a.p.selarrrow.push(this.id);a.p.selrow=this.id}});ua=true;za=[]}else{b(a.rows).each(function(e){if(e>0)if(!b(this).hasClass("subgrid")&&!b(this).hasClass("ui-state-disabled")){b("#jqg_"+b.jgrid.jqID(a.p.id)+"_"+b.jgrid.jqID(this.id)).removeAttr("checked");b(this).removeClass("ui-state-highlight").attr("aria-selected","false");za.push(this.id)}});a.p.selrow=
|
93
|
+
null;ua=false}if(b.isFunction(a.p.onSelectAll))a.p.onSelectAll.call(a,ua?a.p.selarrrow:za,ua)})}if(a.p.autowidth===true){ba=b(Q).innerWidth();a.p.width=ba>0?ba:"nw"}(function(){var e=0,d=E?0:a.p.cellLayout,i=0,n,p=a.p.scrollOffset,A,s=false,F,t=0,z=0,v;b.each(a.p.colModel,function(){if(typeof this.hidden==="undefined")this.hidden=false;this.widthOrg=A=K(this.width,0);if(this.hidden===false){e+=A+d;if(this.fixed)t+=A+d;else i++;z++}});if(isNaN(a.p.width))a.p.width=g.width=e;else g.width=a.p.width;
|
94
|
+
a.p.tblwidth=e;if(a.p.shrinkToFit===false&&a.p.forceFit===true)a.p.forceFit=false;if(a.p.shrinkToFit===true&&i>0){F=g.width-d*i-t;if(!isNaN(a.p.height)){F-=p;s=true}e=0;b.each(a.p.colModel,function(u){if(this.hidden===false&&!this.fixed){this.width=A=Math.round(F*this.width/(a.p.tblwidth-d*i-t));e+=A;n=u}});v=0;if(s){if(g.width-t-(e+d*i)!==p)v=g.width-t-(e+d*i)-p}else if(!s&&Math.abs(g.width-t-(e+d*i))!==1)v=g.width-t-(e+d*i);a.p.colModel[n].width+=v;a.p.tblwidth=e+v+d*i+t;if(a.p.tblwidth>a.p.width){a.p.colModel[n].width-=
|
95
|
+
a.p.tblwidth-parseInt(a.p.width,10);a.p.tblwidth=a.p.width}}})();b(Q).css("width",g.width+"px").append("<div class='ui-jqgrid-resize-mark' id='rs_m"+a.p.id+"'> </div>");b(r).css("width",g.width+"px");ba=b("thead:first",a).get(0);var va="";if(a.p.footerrow)va+="<table role='grid' style='width:"+a.p.tblwidth+"px' class='ui-jqgrid-ftable' cellspacing='0' cellpadding='0' border='0'><tbody><tr role='row' class='ui-widget-content footrow footrow-"+l+"'>";r=b("tr:first",ba);var wa="<tr class='jqgfirstrow' role='row' style='height:auto'>";
|
96
|
+
a.p.disableClick=false;b("th",r).each(function(e){sa=a.p.colModel[e].width;if(typeof a.p.colModel[e].resizable==="undefined")a.p.colModel[e].resizable=true;if(a.p.colModel[e].resizable){qa=document.createElement("span");b(qa).html(" ").addClass("ui-jqgrid-resize ui-jqgrid-resize-"+l);b.browser.opera||b(qa).css("cursor","col-resize");b(this).addClass(a.p.resizeclass)}else qa="";b(this).css("width",sa+"px").prepend(qa);var d="";if(a.p.colModel[e].hidden){b(this).css("display","none");d="display:none;"}wa+=
|
97
|
+
"<td role='gridcell' style='height:0px;width:"+sa+"px;"+d+"'></td>";g.headers[e]={width:sa,el:this};ta=a.p.colModel[e].sortable;if(typeof ta!=="boolean")ta=a.p.colModel[e].sortable=true;d=a.p.colModel[e].name;d=="cb"||d=="subgrid"||d=="rn"||a.p.viewsortcols[2]&&b("div",this).addClass("ui-jqgrid-sortable");if(ta)if(a.p.viewsortcols[0]){b("div span.s-ico",this).show();e==a.p.lastsort&&b("div span.ui-icon-"+a.p.sortorder,this).removeClass("ui-state-disabled")}else if(e==a.p.lastsort){b("div span.s-ico",
|
98
|
+
this).show();b("div span.ui-icon-"+a.p.sortorder,this).removeClass("ui-state-disabled")}if(a.p.footerrow)va+="<td role='gridcell' "+O(e,0,"",null,"",false)+"> </td>"}).mousedown(function(e){if(b(e.target).closest("th>span.ui-jqgrid-resize").length==1){var d=b.jgrid.getCellIndex(this);if(a.p.forceFit===true){var i=a.p,n=d,p;for(p=d+1;p<a.p.colModel.length;p++)if(a.p.colModel[p].hidden!==true){n=p;break}i.nv=n-d}g.dragStart(d,e,Fa(d));return false}}).click(function(e){if(a.p.disableClick)return a.p.disableClick=
|
99
|
+
false;var d="th>div.ui-jqgrid-sortable",i,n;a.p.viewsortcols[2]||(d="th>div>span>span.ui-grid-ico-sort");e=b(e.target).closest(d);if(e.length==1){d=b.jgrid.getCellIndex(this);if(!a.p.viewsortcols[2]){i=true;n=e.attr("sort")}Ca(b("div",this)[0].id,d,i,n);return false}});if(a.p.sortable&&b.fn.sortable)try{b(a).jqGrid("sortableColumns",r)}catch(La){}if(a.p.footerrow)va+="</tr></tbody></table>";wa+="</tr>";this.appendChild(document.createElement("tbody"));b(this).addClass("ui-jqgrid-btable").append(wa);
|
100
|
+
wa=null;r=b("<table class='ui-jqgrid-htable' style='width:"+a.p.tblwidth+"px' role='grid' aria-labelledby='gbox_"+this.id+"' cellspacing='0' cellpadding='0' border='0'></table>").append(ba);var da=a.p.caption&&a.p.hiddengrid===true?true:false;k=b("<div class='ui-jqgrid-hbox"+(l=="rtl"?"-rtl":"")+"'></div>");ba=null;g.hDiv=document.createElement("div");b(g.hDiv).css({width:g.width+"px"}).addClass("ui-state-default ui-jqgrid-hdiv").append(k);b(k).append(r);r=null;da&&b(g.hDiv).hide();if(a.p.pager){if(typeof a.p.pager==
|
101
|
+
"string"){if(a.p.pager.substr(0,1)!="#")a.p.pager="#"+a.p.pager}else a.p.pager="#"+b(a.p.pager).attr("id");b(a.p.pager).css({width:g.width+"px"}).appendTo(Q).addClass("ui-state-default ui-jqgrid-pager ui-corner-bottom");da&&b(a.p.pager).hide();x(a.p.pager,"")}a.p.cellEdit===false&&a.p.hoverrows===true&&b(a).bind("mouseover",function(e){P=b(e.target).closest("tr.jqgrow");b(P).attr("class")!=="subgrid"&&b(P).addClass("ui-state-hover");return false}).bind("mouseout",function(e){P=b(e.target).closest("tr.jqgrow");
|
102
|
+
b(P).removeClass("ui-state-hover");return false});var ka,la;b(a).before(g.hDiv).click(function(e){X=e.target;P=b(X,a.rows).closest("tr.jqgrow");if(b(P).length===0||P[0].className.indexOf("ui-state-disabled")>-1)return this;var d=b(X).hasClass("cbox"),i=true;if(b.isFunction(a.p.beforeSelectRow))i=a.p.beforeSelectRow.call(a,P[0].id,e);if(X.tagName=="A"||(X.tagName=="INPUT"||X.tagName=="TEXTAREA"||X.tagName=="OPTION"||X.tagName=="SELECT")&&!d)return this;if(i===true){if(a.p.cellEdit===true)if(a.p.multiselect&&
|
103
|
+
d)b(a).jqGrid("setSelection",P[0].id,true);else{ka=P[0].rowIndex;la=b.jgrid.getCellIndex(X);try{b(a).jqGrid("editCell",ka,la,true)}catch(n){}}else if(a.p.multikey)if(e[a.p.multikey])b(a).jqGrid("setSelection",P[0].id,true);else{if(a.p.multiselect&&d){d=b("#jqg_"+b.jgrid.jqID(a.p.id)+"_"+P[0].id).attr("checked");b("#jqg_"+b.jgrid.jqID(a.p.id)+"_"+P[0].id).attr("checked",!d)}}else{if(a.p.multiselect&&a.p.multiboxonly)if(!d){b(a.p.selarrrow).each(function(p,A){var s=a.rows.namedItem(A);b(s).removeClass("ui-state-highlight");
|
104
|
+
b("#jqg_"+b.jgrid.jqID(a.p.id)+"_"+b.jgrid.jqID(A)).attr("checked",false)});a.p.selarrrow=[];b("#cb_"+b.jgrid.jqID(a.p.id),a.grid.hDiv).attr("checked",false)}b(a).jqGrid("setSelection",P[0].id,true)}if(b.isFunction(a.p.onCellSelect)){ka=P[0].id;la=b.jgrid.getCellIndex(X);a.p.onCellSelect.call(a,ka,la,b(X).html(),e)}}return this}).bind("reloadGrid",function(e,d){if(a.p.treeGrid===true)a.p.datatype=a.p.treedatatype;d&&d.current&&a.grid.selectionPreserver(a);if(a.p.datatype=="local"){b(a).jqGrid("resetSelection");
|
105
|
+
a.p.data.length&&U()}else if(!a.p.treeGrid){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=[]}a.p.scroll&&W(a.grid.bDiv,true,false);if(d&&d.page){var i=d.page;if(i>a.p.lastpage)i=a.p.lastpage;if(i<1)i=1;a.p.page=i;a.grid.bDiv.scrollTop=a.grid.prevRowHeight?(i-1)*a.grid.prevRowHeight*a.p.rowNum:0}if(a.grid.prevRowHeight&&a.p.scroll){delete a.p.lastpage;a.grid.populateVisible()}else a.grid.populate();return false});
|
106
|
+
b.isFunction(this.p.ondblClickRow)&&b(this).dblclick(function(e){X=e.target;P=b(X,a.rows).closest("tr.jqgrow");if(b(P).length===0)return false;ka=P[0].rowIndex;la=b.jgrid.getCellIndex(X);a.p.ondblClickRow.call(a,b(P).attr("id"),ka,la,e);return false});b.isFunction(this.p.onRightClickRow)&&b(this).bind("contextmenu",function(e){X=e.target;P=b(X,a.rows).closest("tr.jqgrow");if(b(P).length===0)return false;a.p.multiselect||b(a).jqGrid("setSelection",P[0].id,true);ka=P[0].rowIndex;la=b.jgrid.getCellIndex(X);
|
107
|
+
a.p.onRightClickRow.call(a,b(P).attr("id"),ka,la,e);return false});g.bDiv=document.createElement("div");if(y)if(String(a.p.height).toLowerCase()==="auto")a.p.height="100%";b(g.bDiv).append(b('<div style="position:relative;'+(y&&b.browser.version<8?"height:0.01%;":"")+'"></div>').append("<div></div>").append(this)).addClass("ui-jqgrid-bdiv").css({height:a.p.height+(isNaN(a.p.height)?"":"px"),width:g.width+"px"}).scroll(g.scrollGrid);b("table:first",g.bDiv).css({width:a.p.tblwidth+"px"});if(y){b("tbody",
|
108
|
+
this).size()==2&&b("tbody:gt(0)",this).remove();a.p.multikey&&b(g.bDiv).bind("selectstart",function(){return false})}else a.p.multikey&&b(g.bDiv).bind("mousedown",function(){return false});da&&b(g.bDiv).hide();g.cDiv=document.createElement("div");var Aa=a.p.hidegrid===true?b("<a role='link' href='javascript:void(0)'/>").addClass("ui-jqgrid-titlebar-close HeaderButton").hover(function(){Aa.addClass("ui-state-hover")},function(){Aa.removeClass("ui-state-hover")}).append("<span class='ui-icon ui-icon-circle-triangle-n'></span>").css(l==
|
109
|
+
"rtl"?"left":"right","0px"):"";b(g.cDiv).append(Aa).append("<span class='ui-jqgrid-title"+(l=="rtl"?"-rtl":"")+"'>"+a.p.caption+"</span>").addClass("ui-jqgrid-titlebar ui-widget-header ui-corner-top ui-helper-clearfix");b(g.cDiv).insertBefore(g.hDiv);if(a.p.toolbar[0]){g.uDiv=document.createElement("div");if(a.p.toolbar[1]=="top")b(g.uDiv).insertBefore(g.hDiv);else a.p.toolbar[1]=="bottom"&&b(g.uDiv).insertAfter(g.hDiv);if(a.p.toolbar[1]=="both"){g.ubDiv=document.createElement("div");b(g.uDiv).insertBefore(g.hDiv).addClass("ui-userdata ui-state-default").attr("id",
|
110
|
+
"t_"+this.id);b(g.ubDiv).insertAfter(g.hDiv).addClass("ui-userdata ui-state-default").attr("id","tb_"+this.id);da&&b(g.ubDiv).hide()}else b(g.uDiv).width(g.width).addClass("ui-userdata ui-state-default").attr("id","t_"+this.id);da&&b(g.uDiv).hide()}if(a.p.toppager){a.p.toppager=b.jgrid.jqID(a.p.id)+"_toppager";g.topDiv=b("<div id='"+a.p.toppager+"'></div>")[0];a.p.toppager="#"+a.p.toppager;b(g.topDiv).insertBefore(g.hDiv).addClass("ui-state-default ui-jqgrid-toppager").width(g.width);x(a.p.toppager,
|
111
|
+
"_t")}if(a.p.footerrow){g.sDiv=b("<div class='ui-jqgrid-sdiv'></div>")[0];k=b("<div class='ui-jqgrid-hbox"+(l=="rtl"?"-rtl":"")+"'></div>");b(g.sDiv).append(k).insertAfter(g.hDiv).width(g.width);b(k).append(va);g.footers=b(".ui-jqgrid-ftable",g.sDiv)[0].rows[0].cells;if(a.p.rownumbers)g.footers[0].className="ui-state-default jqgrid-rownum";da&&b(g.sDiv).hide()}k=null;if(a.p.caption){var Ga=a.p.datatype;if(a.p.hidegrid===true){b(".ui-jqgrid-titlebar-close",g.cDiv).click(function(e){var d=b.isFunction(a.p.onHeaderClick),
|
112
|
+
i=".ui-jqgrid-bdiv, .ui-jqgrid-hdiv, .ui-jqgrid-pager, .ui-jqgrid-sdiv",n,p=this;if(a.p.toolbar[0]===true){if(a.p.toolbar[1]=="both")i+=", #"+b(g.ubDiv).attr("id");i+=", #"+b(g.uDiv).attr("id")}n=b(i,"#gview_"+b.jgrid.jqID(a.p.id)).length;if(a.p.gridstate=="visible")b(i,"#gbox_"+b.jgrid.jqID(a.p.id)).slideUp("fast",function(){n--;if(n===0){b("span",p).removeClass("ui-icon-circle-triangle-n").addClass("ui-icon-circle-triangle-s");a.p.gridstate="hidden";b("#gbox_"+b.jgrid.jqID(a.p.id)).hasClass("ui-resizable")&&
|
113
|
+
b(".ui-resizable-handle","#gbox_"+b.jgrid.jqID(a.p.id)).hide();if(d)da||a.p.onHeaderClick.call(a,a.p.gridstate,e)}});else a.p.gridstate=="hidden"&&b(i,"#gbox_"+b.jgrid.jqID(a.p.id)).slideDown("fast",function(){n--;if(n===0){b("span",p).removeClass("ui-icon-circle-triangle-s").addClass("ui-icon-circle-triangle-n");if(da){a.p.datatype=Ga;ja();da=false}a.p.gridstate="visible";b("#gbox_"+b.jgrid.jqID(a.p.id)).hasClass("ui-resizable")&&b(".ui-resizable-handle","#gbox_"+b.jgrid.jqID(a.p.id)).show();if(d)da||
|
114
|
+
a.p.onHeaderClick.call(a,a.p.gridstate,e)}});return false});if(da){a.p.datatype="local";b(".ui-jqgrid-titlebar-close",g.cDiv).trigger("click")}}}else b(g.cDiv).hide();b(g.hDiv).after(g.bDiv).mousemove(function(e){if(g.resizing){g.dragMove(e);return false}});b(".ui-jqgrid-labels",g.hDiv).bind("selectstart",function(){return false});b(document).mouseup(function(){if(g.resizing){g.dragEnd();return false}return true});a.formatCol=O;a.sortData=Ca;a.updatepager=function(e,d){var i,n,p,A,s,F,t,z="",v=a.p.pager?
|
115
|
+
"_"+b.jgrid.jqID(a.p.pager.substr(1)):"",u=a.p.toppager?"_"+a.p.toppager.substr(1):"";p=parseInt(a.p.page,10)-1;if(p<0)p=0;p*=parseInt(a.p.rowNum,10);s=p+a.p.reccount;if(a.p.scroll){i=b("tbody:first > tr:gt(0)",a.grid.bDiv);p=s-i.length;a.p.reccount=i.length;if(n=i.outerHeight()||a.grid.prevRowHeight){i=p*n;n*=parseInt(a.p.records,10);b(">div:first",a.grid.bDiv).css({height:n}).children("div:first").css({height:i,display:i?"":"none"})}a.grid.bDiv.scrollLeft=a.grid.hDiv.scrollLeft}z=a.p.pager?a.p.pager:
|
116
|
+
"";z+=a.p.toppager?z?","+a.p.toppager:a.p.toppager:"";if(z){t=b.jgrid.formatter.integer||{};i=K(a.p.page);n=K(a.p.lastpage);b(".selbox",z).attr("disabled",false);if(a.p.pginput===true){b(".ui-pg-input",z).val(a.p.page);A=a.p.toppager?"#sp_1"+v+",#sp_1"+u:"#sp_1"+v;b(A).html(b.fmatter?b.fmatter.util.NumberFormat(a.p.lastpage,t):a.p.lastpage)}if(a.p.viewrecords)if(a.p.reccount===0)b(".ui-paging-info",z).html(a.p.emptyrecords);else{A=p+1;F=a.p.records;if(b.fmatter){A=b.fmatter.util.NumberFormat(A,t);
|
117
|
+
s=b.fmatter.util.NumberFormat(s,t);F=b.fmatter.util.NumberFormat(F,t)}b(".ui-paging-info",z).html(b.jgrid.format(a.p.recordtext,A,s,F))}if(a.p.pgbuttons===true){if(i<=0)i=n=0;if(i==1||i===0){b("#first"+v+", #prev"+v).addClass("ui-state-disabled").removeClass("ui-state-hover");a.p.toppager&&b("#first_t"+u+", #prev_t"+u).addClass("ui-state-disabled").removeClass("ui-state-hover")}else{b("#first"+v+", #prev"+v).removeClass("ui-state-disabled");a.p.toppager&&b("#first_t"+u+", #prev_t"+u).removeClass("ui-state-disabled")}if(i==
|
118
|
+
n||i===0){b("#next"+v+", #last"+v).addClass("ui-state-disabled").removeClass("ui-state-hover");a.p.toppager&&b("#next_t"+u+", #last_t"+u).addClass("ui-state-disabled").removeClass("ui-state-hover")}else{b("#next"+v+", #last"+v).removeClass("ui-state-disabled");a.p.toppager&&b("#next_t"+u+", #last_t"+u).removeClass("ui-state-disabled")}}}e===true&&a.p.rownumbers===true&&b("td.jqgrid-rownum",a.rows).each(function(G){b(this).html(p+1+G)});d&&a.p.jqgdnd&&b(a).jqGrid("gridDnD","updateDnD");b.isFunction(a.p.gridComplete)&&
|
119
|
+
a.p.gridComplete.call(a)};a.refreshIndex=U;a.formatter=function(e,d,i,n,p){return o(e,d,i,n,p)};b.extend(g,{populate:ja,emptyRows:W});this.grid=g;a.addXmlData=function(e){ga(e,a.grid.bDiv)};a.addJSONData=function(e){ca(e,a.grid.bDiv)};this.grid.cols=this.rows[0].cells;ja();a.p.hiddengrid=false;b(window).unload(function(){a=null})}}}})};b.jgrid.extend({getGridParam:function(f){var j=this[0];if(j&&j.grid)return f?typeof j.p[f]!="undefined"?j.p[f]:null:j.p},setGridParam:function(f){return this.each(function(){this.grid&&
|
120
|
+
typeof f==="object"&&b.extend(true,this.p,f)})},getDataIDs:function(){var f=[],j=0,h,c=0;this.each(function(){if((h=this.rows.length)&&h>0)for(;j<h;){if(b(this.rows[j]).hasClass("jqgrow")){f[c]=this.rows[j].id;c++}j++}});return f},setSelection:function(f,j){return this.each(function(){function h(a){var r=b(c.grid.bDiv)[0].clientHeight,x=b(c.grid.bDiv)[0].scrollTop,y=c.rows[a].offsetTop;a=c.rows[a].clientHeight;if(y+a>=r+x)b(c.grid.bDiv)[0].scrollTop=y-(r+x)+a+x;else if(y<r+x)if(y<x)b(c.grid.bDiv)[0].scrollTop=
|
121
|
+
y}var c=this,g,k,l;if(f!==undefined){j=j===false?false:true;k=c.rows.namedItem(f+"");if(!(!k||k.className.indexOf("ui-state-disabled")>-1)){if(c.p.scrollrows===true){g=c.rows.namedItem(f).rowIndex;g>=0&&h(g)}if(c.p.multiselect){c.p.selrow=k.id;l=b.inArray(c.p.selrow,c.p.selarrrow);if(l===-1){k.className!=="ui-subgrid"&&b(k).addClass("ui-state-highlight").attr("aria-selected","true");g=true;b("#jqg_"+b.jgrid.jqID(c.p.id)+"_"+b.jgrid.jqID(c.p.selrow)).attr("checked",g);c.p.selarrrow.push(c.p.selrow)}else{k.className!==
|
122
|
+
"ui-subgrid"&&b(k).removeClass("ui-state-highlight").attr("aria-selected","false");g=false;b("#jqg_"+b.jgrid.jqID(c.p.id)+"_"+b.jgrid.jqID(c.p.selrow)).attr("checked",g);c.p.selarrrow.splice(l,1);l=c.p.selarrrow[0];c.p.selrow=l===undefined?null:l}c.p.onSelectRow&&j&&c.p.onSelectRow.call(c,k.id,g)}else if(k.className!=="ui-subgrid"){if(c.p.selrow!=k.id){b(c.rows.namedItem(c.p.selrow)).removeClass("ui-state-highlight").attr({"aria-selected":"false",tabindex:"-1"});b(k).addClass("ui-state-highlight").attr({"aria-selected":true,
|
123
|
+
tabindex:"0"});g=true}else g=false;c.p.selrow=k.id;c.p.onSelectRow&&j&&c.p.onSelectRow.call(c,k.id,g)}}}})},resetSelection:function(f){return this.each(function(){var j=this,h,c;if(typeof f!=="undefined"){c=f===j.p.selrow?j.p.selrow:f;b("#"+b.jgrid.jqID(j.p.id)+" tbody:first tr#"+b.jgrid.jqID(c)).removeClass("ui-state-highlight").attr("aria-selected","false");if(j.p.multiselect){b("#jqg_"+b.jgrid.jqID(j.p.id)+"_"+b.jgrid.jqID(c)).attr("checked",false);b("#cb_"+b.jgrid.jqID(j.p.id)).attr("checked",
|
124
|
+
false)}c=null}else if(j.p.multiselect){b(j.p.selarrrow).each(function(g,k){h=j.rows.namedItem(k);b(h).removeClass("ui-state-highlight").attr("aria-selected","false");b("#jqg_"+b.jgrid.jqID(j.p.id)+"_"+b.jgrid.jqID(k)).attr("checked",false)});b("#cb_"+b.jgrid.jqID(j.p.id)).attr("checked",false);j.p.selarrrow=[]}else if(j.p.selrow){b("#"+b.jgrid.jqID(j.p.id)+" tbody:first tr#"+b.jgrid.jqID(j.p.selrow)).removeClass("ui-state-highlight").attr("aria-selected","false");j.p.selrow=null}j.p.savedRow=[]})},
|
125
|
+
getRowData:function(f){var j={},h,c=false,g,k=0;this.each(function(){var l=this,a,r;if(typeof f=="undefined"){c=true;h=[];g=l.rows.length}else{r=l.rows.namedItem(f);if(!r)return j;g=2}for(;k<g;){if(c)r=l.rows[k];if(b(r).hasClass("jqgrow")){b("td",r).each(function(x){a=l.p.colModel[x].name;if(a!=="cb"&&a!=="subgrid"&&a!=="rn")if(l.p.treeGrid===true&&a==l.p.ExpandColumn)j[a]=b.jgrid.htmlDecode(b("span:first",this).html());else try{j[a]=b.unformat(this,{rowId:r.id,colModel:l.p.colModel[x]},x)}catch(y){j[a]=
|
126
|
+
b.jgrid.htmlDecode(b(this).html())}});if(c){h.push(j);j={}}}k++}});return h?h:j},delRowData:function(f){var j=false,h,c;this.each(function(){if(h=this.rows.namedItem(f)){b(h).remove();this.p.records--;this.p.reccount--;this.updatepager(true,false);j=true;if(this.p.multiselect){c=b.inArray(f,this.p.selarrrow);c!=-1&&this.p.selarrrow.splice(c,1)}if(f==this.p.selrow)this.p.selrow=null}else return false;if(this.p.datatype=="local"){var g=this.p._index[f];if(typeof g!="undefined"){this.p.data.splice(g,
|
127
|
+
1);this.refreshIndex()}}if(this.p.altRows===true&&j){var k=this.p.altclass;b(this.rows).each(function(l){l%2==1?b(this).addClass(k):b(this).removeClass(k)})}});return j},setRowData:function(f,j,h){var c,g=true,k;this.each(function(){if(!this.grid)return false;var l=this,a,r,x=typeof h,y={};r=l.rows.namedItem(f);if(!r)return false;if(j)try{b(this.p.colModel).each(function(O){c=this.name;if(j[c]!==undefined){y[c]=this.formatter&&typeof this.formatter==="string"&&this.formatter=="date"?b.unformat.date(j[c],
|
128
|
+
this):j[c];a=l.formatter(f,j[c],O,j,"edit");k=this.title?{title:b.jgrid.stripHtml(a)}:{};l.p.treeGrid===true&&c==l.p.ExpandColumn?b("td:eq("+O+") > span:first",r).html(a).attr(k):b("td:eq("+O+")",r).html(a).attr(k)}});if(l.p.datatype=="local"){var E=l.p._index[f];if(l.p.treeGrid)for(var Q in l.p.treeReader)y.hasOwnProperty(l.p.treeReader[Q])&&delete y[l.p.treeReader[Q]];if(typeof E!="undefined")l.p.data[E]=b.extend(true,l.p.data[E],y);y=null}}catch(K){g=false}if(g)if(x==="string")b(r).addClass(h);
|
129
|
+
else x==="object"&&b(r).css(h)});return g},addRowData:function(f,j,h,c){h||(h="last");var g=false,k,l,a,r,x,y,E,Q,K="",O,m,o,q,B;if(j){if(b.isArray(j)){O=true;h="last";m=f}else{j=[j];O=false}this.each(function(){var T=j.length;x=this.p.rownumbers===true?1:0;a=this.p.multiselect===true?1:0;r=this.p.subGrid===true?1:0;if(!O)if(typeof f!="undefined")f+="";else{f=b.jgrid.randId();if(this.p.keyIndex!==false){m=this.p.colModel[this.p.keyIndex+a+r+x].name;if(typeof j[0][m]!="undefined")f=j[0][m]}}o=this.p.altclass;
|
130
|
+
for(var J=0,D="",W={},U=b.isFunction(this.p.afterInsertRow)?true:false;J<T;){q=j[J];l="";if(O){try{f=q[m]}catch(ga){f=b.jgrid.randId()}D=this.p.altRows===true?(this.rows.length-1)%2===0?o:"":""}if(x){K=this.formatCol(0,1,"",null,f,true);l+='<td role="gridcell" aria-describedby="'+this.p.id+'_rn" class="ui-state-default jqgrid-rownum" '+K+">0</td>"}if(a){Q='<input role="checkbox" type="checkbox" id="jqg_'+this.p.id+"_"+f+'" class="cbox"/>';K=this.formatCol(x,1,"",null,f,true);l+='<td role="gridcell" aria-describedby="'+
|
131
|
+
this.p.id+'_cb" '+K+">"+Q+"</td>"}if(r)l+=b(this).jqGrid("addSubGridCell",a+x,1);for(E=a+r+x;E<this.p.colModel.length;E++){B=this.p.colModel[E];k=B.name;W[k]=B.formatter&&typeof B.formatter==="string"&&B.formatter=="date"?b.unformat.date(q[k],B):q[k];Q=this.formatter(f,b.jgrid.getAccessor(q,k),E,q,"edit");K=this.formatCol(E,1,Q,f,q,true);l+='<td role="gridcell" aria-describedby="'+this.p.id+"_"+k+'" '+K+">"+Q+"</td>"}l='<tr id="'+f+'" role="row" tabindex="-1" class="ui-widget-content jqgrow ui-row-'+
|
132
|
+
this.p.direction+" "+D+'">'+l+"</tr>";if(this.rows.length===0)b("table:first",this.grid.bDiv).append(l);else switch(h){case "last":b(this.rows[this.rows.length-1]).after(l);y=this.rows.length-1;break;case "first":b(this.rows[0]).after(l);y=1;break;case "after":if(y=this.rows.namedItem(c))b(this.rows[y.rowIndex+1]).hasClass("ui-subgrid")?b(this.rows[y.rowIndex+1]).after(l):b(y).after(l);y++;break;case "before":if(y=this.rows.namedItem(c)){b(y).before(l);y=y.rowIndex}y--}this.p.subGrid===true&&b(this).jqGrid("addSubGrid",
|
133
|
+
a+x,y);this.p.records++;this.p.reccount++;U&&this.p.afterInsertRow.call(this,f,q,q);J++;if(this.p.datatype=="local"){W[this.p.localReader.id]=f;this.p._index[f]=this.p.data.length;this.p.data.push(W);W={}}}if(this.p.altRows===true&&!O)if(h=="last")(this.rows.length-1)%2==1&&b(this.rows[this.rows.length-1]).addClass(o);else b(this.rows).each(function(ca){ca%2==1?b(this).addClass(o):b(this).removeClass(o)});this.updatepager(true,true);g=true})}return g},footerData:function(f,j,h){function c(r){for(var x in r)if(r.hasOwnProperty(x))return false;
|
134
|
+
return true}var g,k=false,l={},a;if(typeof f=="undefined")f="get";if(typeof h!="boolean")h=true;f=f.toLowerCase();this.each(function(){var r=this,x;if(!r.grid||!r.p.footerrow)return false;if(f=="set")if(c(j))return false;k=true;b(this.p.colModel).each(function(y){g=this.name;if(f=="set"){if(j[g]!==undefined){x=h?r.formatter("",j[g],y,j,"edit"):j[g];a=this.title?{title:b.jgrid.stripHtml(x)}:{};b("tr.footrow td:eq("+y+")",r.grid.sDiv).html(x).attr(a);k=true}}else if(f=="get")l[g]=b("tr.footrow td:eq("+
|
135
|
+
y+")",r.grid.sDiv).html()})});return f=="get"?l:k},showHideCol:function(f,j){return this.each(function(){var h=this,c=false,g=b.browser.webkit||b.browser.safari?0:h.p.cellLayout,k;if(h.grid){if(typeof f==="string")f=[f];j=j!="none"?"":"none";var l=j===""?true:false;b(this.p.colModel).each(function(a){if(b.inArray(this.name,f)!==-1&&this.hidden===l){b("tr",h.grid.hDiv).each(function(){b(this).children("th:eq("+a+")").css("display",j)});b(h.rows).each(function(){b(this).children("td:eq("+a+")").css("display",
|
136
|
+
j)});h.p.footerrow&&b("tr.footrow td:eq("+a+")",h.grid.sDiv).css("display",j);k=this.widthOrg?this.widthOrg:parseInt(this.width,10);if(j==="none")h.p.tblwidth-=k+g;else h.p.tblwidth+=k+g;this.hidden=!l;c=true}});if(c===true)if(h.p.shrinkToFit===false)b(h).jqGrid("setGridWidth",h.grid.width);else h.grid.width!==h.p.tblwidth&&b(h).jqGrid("setGridWidth",h.p.tblwidth)}})},hideCol:function(f){return this.each(function(){b(this).jqGrid("showHideCol",f,"none")})},showCol:function(f){return this.each(function(){b(this).jqGrid("showHideCol",
|
137
|
+
f,"")})},remapColumns:function(f,j,h){function c(l){var a;a=l.length?b.makeArray(l):b.extend({},l);b.each(f,function(r){l[r]=a[this]})}function g(l,a){b(">tr"+(a||""),l).each(function(){var r=this,x=b.makeArray(r.cells);b.each(f,function(){var y=x[this];y&&r.appendChild(y)})})}var k=this.get(0);c(k.p.colModel);c(k.p.colNames);c(k.grid.headers);g(b("thead:first",k.grid.hDiv),h&&":not(.ui-jqgrid-labels)");j&&g(b("#"+b.jgrid.jqID(k.p.id)+" tbody:first"),".jqgfirstrow, tr.jqgrow, tr.jqfoot");k.p.footerrow&&
|
138
|
+
g(b("tbody:first",k.grid.sDiv));if(k.p.remapColumns)if(k.p.remapColumns.length)c(k.p.remapColumns);else k.p.remapColumns=b.makeArray(f);k.p.lastsort=b.inArray(k.p.lastsort,f);if(k.p.treeGrid)k.p.expColInd=b.inArray(k.p.expColInd,f)},setGridWidth:function(f,j){return this.each(function(){if(this.grid){var h=this,c,g=0,k=b.browser.webkit||b.browser.safari?0:h.p.cellLayout,l,a=0,r=false,x=h.p.scrollOffset,y,E=0,Q=0,K;if(typeof j!="boolean")j=h.p.shrinkToFit;if(!isNaN(f)){f=parseInt(f,10);h.grid.width=
|
139
|
+
h.p.width=f;b("#gbox_"+b.jgrid.jqID(h.p.id)).css("width",f+"px");b("#gview_"+b.jgrid.jqID(h.p.id)).css("width",f+"px");b(h.grid.bDiv).css("width",f+"px");b(h.grid.hDiv).css("width",f+"px");h.p.pager&&b(h.p.pager).css("width",f+"px");h.p.toppager&&b(h.p.toppager).css("width",f+"px");if(h.p.toolbar[0]===true){b(h.grid.uDiv).css("width",f+"px");h.p.toolbar[1]=="both"&&b(h.grid.ubDiv).css("width",f+"px")}h.p.footerrow&&b(h.grid.sDiv).css("width",f+"px");if(j===false&&h.p.forceFit===true)h.p.forceFit=
|
140
|
+
false;if(j===true){b.each(h.p.colModel,function(){if(this.hidden===false){c=this.widthOrg?this.widthOrg:parseInt(this.width,10);g+=c+k;if(this.fixed)E+=c+k;else a++;Q++}});if(a===0)return;h.p.tblwidth=g;y=f-k*a-E;if(!isNaN(h.p.height))if(b(h.grid.bDiv)[0].clientHeight<b(h.grid.bDiv)[0].scrollHeight||h.rows.length===1){r=true;y-=x}g=0;var O=h.grid.cols.length>0;b.each(h.p.colModel,function(m){if(this.hidden===false&&!this.fixed){c=this.widthOrg?this.widthOrg:parseInt(this.width,10);c=Math.round(y*
|
141
|
+
c/(h.p.tblwidth-k*a-E));if(!(c<0)){this.width=c;g+=c;h.grid.headers[m].width=c;h.grid.headers[m].el.style.width=c+"px";if(h.p.footerrow)h.grid.footers[m].style.width=c+"px";if(O)h.grid.cols[m].style.width=c+"px";l=m}}});K=0;if(r){if(f-E-(g+k*a)!==x)K=f-E-(g+k*a)-x}else if(Math.abs(f-E-(g+k*a))!==1)K=f-E-(g+k*a);h.p.colModel[l].width+=K;h.p.tblwidth=g+K+k*a+E;if(h.p.tblwidth>f){r=h.p.tblwidth-parseInt(f,10);h.p.tblwidth=f;c=h.p.colModel[l].width-=r}else c=h.p.colModel[l].width;h.grid.headers[l].width=
|
142
|
+
c;h.grid.headers[l].el.style.width=c+"px";if(O)h.grid.cols[l].style.width=c+"px";if(h.p.footerrow)h.grid.footers[l].style.width=c+"px"}if(h.p.tblwidth){b("table:first",h.grid.bDiv).css("width",h.p.tblwidth+"px");b("table:first",h.grid.hDiv).css("width",h.p.tblwidth+"px");h.grid.hDiv.scrollLeft=h.grid.bDiv.scrollLeft;h.p.footerrow&&b("table:first",h.grid.sDiv).css("width",h.p.tblwidth+"px")}}}})},setGridHeight:function(f){return this.each(function(){if(this.grid){b(this.grid.bDiv).css({height:f+(isNaN(f)?
|
143
|
+
"":"px")});this.p.height=f;this.p.scroll&&this.grid.populateVisible()}})},setCaption:function(f){return this.each(function(){this.p.caption=f;b("span.ui-jqgrid-title",this.grid.cDiv).html(f);b(this.grid.cDiv).show()})},setLabel:function(f,j,h,c){return this.each(function(){var g=-1;if(this.grid)if(typeof f!="undefined"){b(this.p.colModel).each(function(a){if(this.name==f){g=a;return false}});if(g>=0){var k=b("tr.ui-jqgrid-labels th:eq("+g+")",this.grid.hDiv);if(j){var l=b(".s-ico",k);b("[id^=jqgh_]",
|
144
|
+
k).empty().html(j).append(l);this.p.colNames[g]=j}if(h)typeof h==="string"?b(k).addClass(h):b(k).css(h);typeof c==="object"&&b(k).attr(c)}}})},setCell:function(f,j,h,c,g,k){return this.each(function(){var l=-1,a,r;if(this.grid){if(isNaN(j))b(this.p.colModel).each(function(y){if(this.name==j){l=y;return false}});else l=parseInt(j,10);if(l>=0)if(a=this.rows.namedItem(f)){var x=b("td:eq("+l+")",a);if(h!==""||k===true){a=this.formatter(f,h,l,a,"edit");r=this.p.colModel[l].title?{title:b.jgrid.stripHtml(a)}:
|
145
|
+
{};this.p.treeGrid&&b(".tree-wrap",b(x)).length>0?b("span",b(x)).html(a).attr(r):b(x).html(a).attr(r);if(this.p.datatype=="local"){a=this.p.colModel[l];h=a.formatter&&typeof a.formatter==="string"&&a.formatter=="date"?b.unformat.date(h,a):h;r=this.p._index[f];if(typeof r!="undefined")this.p.data[r][a.name]=h}}if(typeof c==="string")b(x).addClass(c);else c&&b(x).css(c);typeof g==="object"&&b(x).attr(g)}}})},getCell:function(f,j){var h=false;this.each(function(){var c=-1;if(this.grid){if(isNaN(j))b(this.p.colModel).each(function(l){if(this.name===
|
146
|
+
j){c=l;return false}});else c=parseInt(j,10);if(c>=0){var g=this.rows.namedItem(f);if(g)try{h=b.unformat(b("td:eq("+c+")",g),{rowId:g.id,colModel:this.p.colModel[c]},c)}catch(k){h=b.jgrid.htmlDecode(b("td:eq("+c+")",g).html())}}}});return h},getCol:function(f,j,h){var c=[],g,k=0,l=0,a=0,r;j=typeof j!="boolean"?false:j;if(typeof h=="undefined")h=false;this.each(function(){var x=-1;if(this.grid){if(isNaN(f))b(this.p.colModel).each(function(K){if(this.name===f){x=K;return false}});else x=parseInt(f,
|
147
|
+
10);if(x>=0){var y=this.rows.length,E=0;if(y&&y>0){for(;E<y;){if(b(this.rows[E]).hasClass("jqgrow")){try{g=b.unformat(b(this.rows[E].cells[x]),{rowId:this.rows[E].id,colModel:this.p.colModel[x]},x)}catch(Q){g=b.jgrid.htmlDecode(this.rows[E].cells[x].innerHTML)}if(h){r=parseFloat(g);k+=r;l=Math.min(l,r);a=Math.max(l,r)}else j?c.push({id:this.rows[E].id,value:g}):c.push(g)}E++}if(h)switch(h.toLowerCase()){case "sum":c=k;break;case "avg":c=k/y;break;case "count":c=y;break;case "min":c=l;break;case "max":c=
|
148
|
+
a}}}}});return c},clearGridData:function(f){return this.each(function(){if(this.grid){if(typeof f!="boolean")f=false;if(this.p.deepempty)b("#"+b.jgrid.jqID(this.p.id)+" tbody:first tr:gt(0)").remove();else{var j=b("#"+b.jgrid.jqID(this.p.id)+" tbody:first tr:first")[0];b("#"+b.jgrid.jqID(this.p.id)+" tbody:first").empty().append(j)}this.p.footerrow&&f&&b(".ui-jqgrid-ftable td",this.grid.sDiv).html(" ");this.p.selrow=null;this.p.selarrrow=[];this.p.savedRow=[];this.p.records=0;this.p.page=1;this.p.lastpage=
|
149
|
+
0;this.p.reccount=0;this.p.data=[];this.p_index={};this.updatepager(true,false)}})},getInd:function(f,j){var h=false,c;this.each(function(){if(c=this.rows.namedItem(f))h=j===true?c:c.rowIndex});return h},bindKeys:function(f){var j=b.extend({onEnter:null,onSpace:null,onLeftKey:null,onRightKey:null,scrollingRows:true},f||{});return this.each(function(){var h=this;b("body").is("[role]")||b("body").attr("role","application");h.p.scrollrows=j.scrollingRows;b(h).keydown(function(c){var g=b(h).find("tr[tabindex=0]")[0],
|
150
|
+
k,l,a,r=h.p.treeReader.expanded_field;if(g){a=h.p._index[g.id];if(c.keyCode===37||c.keyCode===38||c.keyCode===39||c.keyCode===40){if(c.keyCode===38){l=g.previousSibling;k="";if(l)if(b(l).is(":hidden"))for(;l;){l=l.previousSibling;if(!b(l).is(":hidden")&&b(l).hasClass("jqgrow")){k=l.id;break}}else k=l.id;b(h).jqGrid("setSelection",k)}if(c.keyCode===40){l=g.nextSibling;k="";if(l)if(b(l).is(":hidden"))for(;l;){l=l.nextSibling;if(!b(l).is(":hidden")&&b(l).hasClass("jqgrow")){k=l.id;break}}else k=l.id;
|
151
|
+
b(h).jqGrid("setSelection",k)}if(c.keyCode===37){h.p.treeGrid&&h.p.data[a][r]&&b(g).find("div.treeclick").trigger("click");b.isFunction(j.onLeftKey)&&j.onLeftKey.call(h,h.p.selrow)}if(c.keyCode===39){h.p.treeGrid&&!h.p.data[a][r]&&b(g).find("div.treeclick").trigger("click");b.isFunction(j.onRightKey)&&j.onRightKey.call(h,h.p.selrow)}return false}else if(c.keyCode===13){b.isFunction(j.onEnter)&&j.onEnter.call(h,h.p.selrow);return false}else if(c.keyCode===32){b.isFunction(j.onSpace)&&j.onSpace.call(h,
|
152
|
+
h.p.selrow);return false}}})})},unbindKeys:function(){return this.each(function(){b(this).unbind("keydown")})},getLocalRow:function(f){var j=false,h;this.each(function(){if(typeof f!=="undefined"){h=this.p._index[f];if(h>=0)j=this.p.data[h]}});return j}})})(jQuery);
|
153
|
+
(function(b){b.fmatter={};b.extend(b.fmatter,{isBoolean:function(a){return typeof a==="boolean"},isObject:function(a){return a&&(typeof a==="object"||b.isFunction(a))||false},isString:function(a){return typeof a==="string"},isNumber:function(a){return typeof a==="number"&&isFinite(a)},isNull:function(a){return a===null},isUndefined:function(a){return typeof a==="undefined"},isValue:function(a){return this.isObject(a)||this.isString(a)||this.isNumber(a)||this.isBoolean(a)},isEmpty:function(a){if(!this.isString(a)&&
|
154
|
+
this.isValue(a))return false;else if(!this.isValue(a))return true;a=b.trim(a).replace(/\ \;/ig,"").replace(/\ \;/ig,"");return a===""}});b.fn.fmatter=function(a,c,d,e,f){var g=c;d=b.extend({},b.jgrid.formatter,d);if(b.fn.fmatter[a])g=b.fn.fmatter[a](c,d,e,f);return g};b.fmatter.util={NumberFormat:function(a,c){b.fmatter.isNumber(a)||(a*=1);if(b.fmatter.isNumber(a)){var d=a<0,e=a+"",f=c.decimalSeparator?c.decimalSeparator:".",g;if(b.fmatter.isNumber(c.decimalPlaces)){var h=c.decimalPlaces;
|
155
|
+
e=Math.pow(10,h);e=Math.round(a*e)/e+"";g=e.lastIndexOf(".");if(h>0){if(g<0){e+=f;g=e.length-1}else if(f!==".")e=e.replace(".",f);for(;e.length-1-g<h;)e+="0"}}if(c.thousandsSeparator){h=c.thousandsSeparator;g=e.lastIndexOf(f);g=g>-1?g:e.length;f=e.substring(g);for(var i=-1,j=g;j>0;j--){i++;if(i%3===0&&j!==g&&(!d||j>1))f=h+f;f=e.charAt(j-1)+f}e=f}e=c.prefix?c.prefix+e:e;return e=c.suffix?e+c.suffix:e}else return a},DateFormat:function(a,c,d,e){var f=/^\/Date\((([-+])?[0-9]+)(([-+])([0-9]{2})([0-9]{2}))?\)\/$/,
|
156
|
+
g=typeof c==="string"?c.match(f):null;f=function(m,r){m=String(m);for(r=parseInt(r,10)||2;m.length<r;)m="0"+m;return m};var h={m:1,d:1,y:1970,h:0,i:0,s:0,u:0},i=0,j,k=["i18n"];k.i18n={dayNames:e.dayNames,monthNames:e.monthNames};if(a in e.masks)a=e.masks[a];if(c.constructor===Number){if(String(a).toLowerCase()=="u")c*=1E3;i=new Date(c)}else if(c.constructor===Date)i=c;else if(g!==null){i=new Date(parseInt(g[1],10));if(g[3]){a=Number(g[5])*60+Number(g[6]);a*=g[4]=="-"?1:-1;a-=i.getTimezoneOffset();
|
157
|
+
i.setTime(Number(Number(i)+a*6E4))}}else{c=String(c).split(/[\\\/:_;.,\t\T\s-]/);a=a.split(/[\\\/:_;.,\t\T\s-]/);g=0;for(j=a.length;g<j;g++){if(a[g]=="M"){i=b.inArray(c[g],k.i18n.monthNames);if(i!==-1&&i<12)c[g]=i+1}if(a[g]=="F"){i=b.inArray(c[g],k.i18n.monthNames);if(i!==-1&&i>11)c[g]=i+1-12}if(c[g])h[a[g].toLowerCase()]=parseInt(c[g],10)}if(h.f)h.m=h.f;if(h.m===0&&h.y===0&&h.d===0)return" ";h.m=parseInt(h.m,10)-1;i=h.y;if(i>=70&&i<=99)h.y=1900+h.y;else if(i>=0&&i<=69)h.y=2E3+h.y;i=new Date(h.y,
|
158
|
+
h.m,h.d,h.h,h.i,h.s,h.u)}if(d in e.masks)d=e.masks[d];else d||(d="Y-m-d");a=i.getHours();c=i.getMinutes();h=i.getDate();g=i.getMonth()+1;j=i.getTimezoneOffset();var l=i.getSeconds(),o=i.getMilliseconds(),n=i.getDay(),p=i.getFullYear(),q=(n+6)%7+1,s=(new Date(p,g-1,h)-new Date(p,0,1))/864E5,t={d:f(h),D:k.i18n.dayNames[n],j:h,l:k.i18n.dayNames[n+7],N:q,S:e.S(h),w:n,z:s,W:q<5?Math.floor((s+q-1)/7)+1:Math.floor((s+q-1)/7)||(((new Date(p-1,0,1)).getDay()+6)%7<4?53:52),F:k.i18n.monthNames[g-1+12],m:f(g),
|
159
|
+
M:k.i18n.monthNames[g-1],n:g,t:"?",L:"?",o:"?",Y:p,y:String(p).substring(2),a:a<12?e.AmPm[0]:e.AmPm[1],A:a<12?e.AmPm[2]:e.AmPm[3],B:"?",g:a%12||12,G:a,h:f(a%12||12),H:f(a),i:f(c),s:f(l),u:o,e:"?",I:"?",O:(j>0?"-":"+")+f(Math.floor(Math.abs(j)/60)*100+Math.abs(j)%60,4),P:"?",T:(String(i).match(/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g)||[""]).pop().replace(/[^-+\dA-Z]/g,""),Z:"?",c:"?",r:"?",U:Math.floor(i/
|
160
|
+
1E3)};return d.replace(/\\.|[dDjlNSwzWFmMntLoYyaABgGhHisueIOPTZcrU]/g,function(m){return m in t?t[m]:m.substring(1)})}};b.fn.fmatter.defaultFormat=function(a,c){return b.fmatter.isValue(a)&&a!==""?a:c.defaultValue?c.defaultValue:" "};b.fn.fmatter.email=function(a,c){return b.fmatter.isEmpty(a)?b.fn.fmatter.defaultFormat(a,c):'<a href="mailto:'+a+'">'+a+"</a>"};b.fn.fmatter.checkbox=function(a,c){var d=b.extend({},c.checkbox),e;b.fmatter.isUndefined(c.colModel.formatoptions)||(d=b.extend({},d,
|
161
|
+
c.colModel.formatoptions));e=d.disabled===true?'disabled="disabled"':"";if(b.fmatter.isEmpty(a)||b.fmatter.isUndefined(a))a=b.fn.fmatter.defaultFormat(a,d);a+="";a=a.toLowerCase();return'<input type="checkbox" '+(a.search(/(false|0|no|off)/i)<0?" checked='checked' ":"")+' value="'+a+'" offval="no" '+e+"/>"};b.fn.fmatter.link=function(a,c){var d={target:c.target},e="";b.fmatter.isUndefined(c.colModel.formatoptions)||(d=b.extend({},d,c.colModel.formatoptions));if(d.target)e="target="+d.target;return b.fmatter.isEmpty(a)?
|
162
|
+
b.fn.fmatter.defaultFormat(a,c):"<a "+e+' href="'+a+'">'+a+"</a>"};b.fn.fmatter.showlink=function(a,c){var d={baseLinkUrl:c.baseLinkUrl,showAction:c.showAction,addParam:c.addParam||"",target:c.target,idName:c.idName},e="";b.fmatter.isUndefined(c.colModel.formatoptions)||(d=b.extend({},d,c.colModel.formatoptions));if(d.target)e="target="+d.target;d=d.baseLinkUrl+d.showAction+"?"+d.idName+"="+c.rowId+d.addParam;return b.fmatter.isString(a)||b.fmatter.isNumber(a)?"<a "+e+' href="'+d+'">'+a+"</a>":b.fn.fmatter.defaultFormat(a,
|
163
|
+
c)};b.fn.fmatter.integer=function(a,c){var d=b.extend({},c.integer);b.fmatter.isUndefined(c.colModel.formatoptions)||(d=b.extend({},d,c.colModel.formatoptions));if(b.fmatter.isEmpty(a))return d.defaultValue;return b.fmatter.util.NumberFormat(a,d)};b.fn.fmatter.number=function(a,c){var d=b.extend({},c.number);b.fmatter.isUndefined(c.colModel.formatoptions)||(d=b.extend({},d,c.colModel.formatoptions));if(b.fmatter.isEmpty(a))return d.defaultValue;return b.fmatter.util.NumberFormat(a,d)};b.fn.fmatter.currency=
|
164
|
+
function(a,c){var d=b.extend({},c.currency);b.fmatter.isUndefined(c.colModel.formatoptions)||(d=b.extend({},d,c.colModel.formatoptions));if(b.fmatter.isEmpty(a))return d.defaultValue;return b.fmatter.util.NumberFormat(a,d)};b.fn.fmatter.date=function(a,c,d,e){d=b.extend({},c.date);b.fmatter.isUndefined(c.colModel.formatoptions)||(d=b.extend({},d,c.colModel.formatoptions));return!d.reformatAfterEdit&&e=="edit"?b.fn.fmatter.defaultFormat(a,c):b.fmatter.isEmpty(a)?b.fn.fmatter.defaultFormat(a,c):b.fmatter.util.DateFormat(d.srcformat,
|
165
|
+
a,d.newformat,d)};b.fn.fmatter.select=function(a,c){a+="";var d=false,e=[];if(b.fmatter.isUndefined(c.colModel.formatoptions)){if(!b.fmatter.isUndefined(c.colModel.editoptions))d=c.colModel.editoptions.value}else d=c.colModel.formatoptions.value;if(d){var f=c.colModel.editoptions.multiple===true?true:false,g=[],h;if(f){g=a.split(",");g=b.map(g,function(l){return b.trim(l)})}if(b.fmatter.isString(d))for(var i=d.split(";"),j=0,k=0;k<i.length;k++){h=i[k].split(":");if(h.length>2)h[1]=jQuery.map(h,function(l,
|
166
|
+
o){if(o>0)return l}).join(":");if(f){if(jQuery.inArray(h[0],g)>-1){e[j]=h[1];j++}}else if(b.trim(h[0])==b.trim(a)){e[0]=h[1];break}}else if(b.fmatter.isObject(d))if(f)e=jQuery.map(g,function(l){return d[l]});else e[0]=d[a]||""}a=e.join(", ");return a===""?b.fn.fmatter.defaultFormat(a,c):a};b.fn.fmatter.rowactions=function(a,c,d,e){var f={keys:false,onEdit:null,onSuccess:null,afterSave:null,onError:null,afterRestore:null,extraparam:{oper:"edit"},url:null,delOptions:{},editOptions:{}};a=b.jgrid.jqID(a);
|
167
|
+
c=b.jgrid.jqID(c);e=b("#"+c)[0].p.colModel[e];b.fmatter.isUndefined(e.formatoptions)||(f=b.extend(f,e.formatoptions));if(!b.fmatter.isUndefined(b("#"+c)[0].p.editOptions))f.editOptions=b("#"+c)[0].p.editOptions;if(!b.fmatter.isUndefined(b("#"+c)[0].p.delOptions))f.delOptions=b("#"+c)[0].p.delOptions;e=function(h){f.afterSave&&f.afterSave(h);b("tr#"+a+" div.ui-inline-edit, tr#"+a+" div.ui-inline-del","#"+c+".ui-jqgrid-btable:first").show();b("tr#"+a+" div.ui-inline-save, tr#"+a+" div.ui-inline-cancel",
|
168
|
+
"#"+c+".ui-jqgrid-btable:first").hide()};var g=function(h){f.afterRestore&&f.afterRestore(h);b("tr#"+a+" div.ui-inline-edit, tr#"+a+" div.ui-inline-del","#"+c+".ui-jqgrid-btable:first").show();b("tr#"+a+" div.ui-inline-save, tr#"+a+" div.ui-inline-cancel","#"+c+".ui-jqgrid-btable:first").hide()};switch(d){case "edit":b("#"+c).jqGrid("editRow",a,f.keys,f.onEdit,f.onSuccess,f.url,f.extraparam,e,f.onError,g);b("tr#"+a+" div.ui-inline-edit, tr#"+a+" div.ui-inline-del","#"+c+".ui-jqgrid-btable:first").hide();
|
169
|
+
b("tr#"+a+" div.ui-inline-save, tr#"+a+" div.ui-inline-cancel","#"+c+".ui-jqgrid-btable:first").show();break;case "save":if(b("#"+c).jqGrid("saveRow",a,f.onSuccess,f.url,f.extraparam,e,f.onError,g)){b("tr#"+a+" div.ui-inline-edit, tr#"+a+" div.ui-inline-del","#"+c+".ui-jqgrid-btable:first").show();b("tr#"+a+" div.ui-inline-save, tr#"+a+" div.ui-inline-cancel","#"+c+".ui-jqgrid-btable:first").hide()}break;case "cancel":b("#"+c).jqGrid("restoreRow",a,g);b("tr#"+a+" div.ui-inline-edit, tr#"+a+" div.ui-inline-del",
|
170
|
+
"#"+c+".ui-jqgrid-btable:first").show();b("tr#"+a+" div.ui-inline-save, tr#"+a+" div.ui-inline-cancel","#"+c+".ui-jqgrid-btable:first").hide();break;case "del":b("#"+c).jqGrid("delGridRow",a,f.delOptions);break;case "formedit":b("#"+c).jqGrid("setSelection",a);b("#"+c).jqGrid("editGridRow",a,f.editOptions)}};b.fn.fmatter.actions=function(a,c){var d={keys:false,editbutton:true,delbutton:true,editformbutton:false};b.fmatter.isUndefined(c.colModel.formatoptions)||(d=b.extend(d,c.colModel.formatoptions));
|
171
|
+
var e=c.rowId,f="",g;if(typeof e=="undefined"||b.fmatter.isEmpty(e))return"";if(d.editformbutton){g="onclick=$.fn.fmatter.rowactions('"+e+"','"+c.gid+"','formedit',"+c.pos+"); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover'); ";f=f+"<div title='"+b.jgrid.nav.edittitle+"' style='float:left;cursor:pointer;' class='ui-pg-div ui-inline-edit' "+g+"><span class='ui-icon ui-icon-pencil'></span></div>"}else if(d.editbutton){g="onclick=$.fn.fmatter.rowactions('"+
|
172
|
+
e+"','"+c.gid+"','edit',"+c.pos+"); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover') ";f=f+"<div title='"+b.jgrid.nav.edittitle+"' style='float:left;cursor:pointer;' class='ui-pg-div ui-inline-edit' "+g+"><span class='ui-icon ui-icon-pencil'></span></div>"}if(d.delbutton){g="onclick=$.fn.fmatter.rowactions('"+e+"','"+c.gid+"','del',"+c.pos+"); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover'); ";
|
173
|
+
f=f+"<div title='"+b.jgrid.nav.deltitle+"' style='float:left;margin-left:5px;' class='ui-pg-div ui-inline-del' "+g+"><span class='ui-icon ui-icon-trash'></span></div>"}g="onclick=$.fn.fmatter.rowactions('"+e+"','"+c.gid+"','save',"+c.pos+"); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover'); ";f=f+"<div title='"+b.jgrid.edit.bSubmit+"' style='float:left;display:none' class='ui-pg-div ui-inline-save' "+g+"><span class='ui-icon ui-icon-disk'></span></div>";
|
174
|
+
g="onclick=$.fn.fmatter.rowactions('"+e+"','"+c.gid+"','cancel',"+c.pos+"); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover'); ";f=f+"<div title='"+b.jgrid.edit.bCancel+"' style='float:left;display:none;margin-left:5px;' class='ui-pg-div ui-inline-cancel' "+g+"><span class='ui-icon ui-icon-cancel'></span></div>";return"<div style='margin-left:8px;'>"+f+"</div>"};b.unformat=function(a,c,d,e){var f,g=c.colModel.formatter,h=c.colModel.formatoptions||
|
175
|
+
{},i=/([\.\*\_\'\(\)\{\}\+\?\\])/g,j=c.colModel.unformat||b.fn.fmatter[g]&&b.fn.fmatter[g].unformat;if(typeof j!=="undefined"&&b.isFunction(j))f=j(b(a).text(),c,a);else if(!b.fmatter.isUndefined(g)&&b.fmatter.isString(g)){f=b.jgrid.formatter||{};switch(g){case "integer":h=b.extend({},f.integer,h);c=h.thousandsSeparator.replace(i,"\\$1");f=b(a).text().replace(RegExp(c,"g"),"");break;case "number":h=b.extend({},f.number,h);c=h.thousandsSeparator.replace(i,"\\$1");f=b(a).text().replace(RegExp(c,"g"),
|
176
|
+
"").replace(h.decimalSeparator,".");break;case "currency":h=b.extend({},f.currency,h);c=h.thousandsSeparator.replace(i,"\\$1");f=b(a).text().replace(RegExp(c,"g"),"").replace(h.decimalSeparator,".").replace(h.prefix,"").replace(h.suffix,"");break;case "checkbox":h=c.colModel.editoptions?c.colModel.editoptions.value.split(":"):["Yes","No"];f=b("input",a).attr("checked")?h[0]:h[1];break;case "select":f=b.unformat.select(a,c,d,e);break;case "actions":return"";default:f=b(a).text()}}return f!==undefined?
|
177
|
+
f:e===true?b(a).text():b.jgrid.htmlDecode(b(a).html())};b.unformat.select=function(a,c,d,e){d=[];a=b(a).text();if(e===true)return a;c=b.extend({},c.colModel.editoptions);if(c.value){var f=c.value;c=c.multiple===true?true:false;e=[];var g;if(c){e=a.split(",");e=b.map(e,function(k){return b.trim(k)})}if(b.fmatter.isString(f))for(var h=f.split(";"),i=0,j=0;j<h.length;j++){g=h[j].split(":");if(g.length>2)g[1]=jQuery.map(g,function(k,l){if(l>0)return k}).join(":");if(c){if(jQuery.inArray(g[1],e)>-1){d[i]=
|
178
|
+
g[0];i++}}else if(b.trim(g[1])==b.trim(a)){d[0]=g[0];break}}else if(b.fmatter.isObject(f)||b.isArray(f)){c||(e[0]=a);d=jQuery.map(e,function(k){var l;b.each(f,function(o,n){if(n==k){l=o;return false}});if(typeof l!="undefined")return l})}return d.join(", ")}else return a||""};b.unformat.date=function(a,c){var d=b.jgrid.formatter.date||{};b.fmatter.isUndefined(c.formatoptions)||(d=b.extend({},d,c.formatoptions));return b.fmatter.isEmpty(a)?b.fn.fmatter.defaultFormat(a,c):b.fmatter.util.DateFormat(d.newformat,
|
179
|
+
a,d.srcformat,d)}})(jQuery);
|
180
|
+
(function(a){a.jgrid.extend({getColProp:function(c){var h={},b=this[0];if(!b.grid)return false;b=b.p.colModel;for(var i=0;i<b.length;i++)if(b[i].name==c){h=b[i];break}return h},setColProp:function(c,h){return this.each(function(){if(this.grid)if(h)for(var b=this.p.colModel,i=0;i<b.length;i++)if(b[i].name==c){a.extend(this.p.colModel[i],h);break}})},sortGrid:function(c,h,b){return this.each(function(){var i=-1;if(this.grid){if(!c)c=this.p.sortname;for(var o=0;o<this.p.colModel.length;o++)if(this.p.colModel[o].index==
|
181
|
+
c||this.p.colModel[o].name==c){i=o;break}if(i!=-1){o=this.p.colModel[i].sortable;if(typeof o!=="boolean")o=true;if(typeof h!=="boolean")h=false;o&&this.sortData("jqgh_"+this.p.id+"_"+c,i,h,b)}}})},GridDestroy:function(){return this.each(function(){if(this.grid){this.p.pager&&a(this.p.pager).remove();var c=this.id;try{a("#gbox_"+c).remove()}catch(h){}}})},GridUnload:function(){return this.each(function(){if(this.grid){var c={id:a(this).attr("id"),cl:a(this).attr("class")};this.p.pager&&a(this.p.pager).empty().removeClass("ui-state-default ui-jqgrid-pager corner-bottom");
|
182
|
+
var h=document.createElement("table");a(h).attr({id:c.id});h.className=c.cl;c=this.id;a(h).removeClass("ui-jqgrid-btable");if(a(this.p.pager).parents("#gbox_"+c).length===1){a(h).insertBefore("#gbox_"+c).show();a(this.p.pager).insertBefore("#gbox_"+c)}else a(h).insertBefore("#gbox_"+c).show();a("#gbox_"+c).remove()}})},setGridState:function(c){return this.each(function(){if(this.grid)if(c=="hidden"){a(".ui-jqgrid-bdiv, .ui-jqgrid-hdiv","#gview_"+this.p.id).slideUp("fast");this.p.pager&&a(this.p.pager).slideUp("fast");
|
183
|
+
this.p.toppager&&a(this.p.toppager).slideUp("fast");if(this.p.toolbar[0]===true){this.p.toolbar[1]=="both"&&a(this.grid.ubDiv).slideUp("fast");a(this.grid.uDiv).slideUp("fast")}this.p.footerrow&&a(".ui-jqgrid-sdiv","#gbox_"+this.p.id).slideUp("fast");a(".ui-jqgrid-titlebar-close span",this.grid.cDiv).removeClass("ui-icon-circle-triangle-n").addClass("ui-icon-circle-triangle-s");this.p.gridstate="hidden"}else if(c=="visible"){a(".ui-jqgrid-hdiv, .ui-jqgrid-bdiv","#gview_"+this.p.id).slideDown("fast");
|
184
|
+
this.p.pager&&a(this.p.pager).slideDown("fast");this.p.toppager&&a(this.p.toppager).slideDown("fast");if(this.p.toolbar[0]===true){this.p.toolbar[1]=="both"&&a(this.grid.ubDiv).slideDown("fast");a(this.grid.uDiv).slideDown("fast")}this.p.footerrow&&a(".ui-jqgrid-sdiv","#gbox_"+this.p.id).slideDown("fast");a(".ui-jqgrid-titlebar-close span",this.grid.cDiv).removeClass("ui-icon-circle-triangle-s").addClass("ui-icon-circle-triangle-n");this.p.gridstate="visible"}})},filterToolbar:function(c){c=a.extend({autosearch:true,
|
185
|
+
searchOnEnter:true,beforeSearch:null,afterSearch:null,beforeClear:null,afterClear:null,searchurl:"",stringResult:false,groupOp:"AND",defaultSearch:"bw"},c||{});return this.each(function(){function h(e,f){var j=a(e);j[0]&&jQuery.each(f,function(){this.data!==undefined?j.bind(this.type,this.data,this.fn):j.bind(this.type,this.fn)})}var b=this;if(!this.ftoolbar){var i=function(){var e={},f=0,j,d,g={},k;a.each(b.p.colModel,function(){d=this.index||this.name;switch(this.stype){case "select":k=this.searchoptions&&
|
186
|
+
this.searchoptions.sopt?this.searchoptions.sopt[0]:"eq";if(j=a("#gs_"+a.jgrid.jqID(this.name),b.grid.hDiv).val()){e[d]=j;g[d]=k;f++}else try{delete b.p.postData[d]}catch(p){}break;case "text":k=this.searchoptions&&this.searchoptions.sopt?this.searchoptions.sopt[0]:c.defaultSearch;if(j=a("#gs_"+a.jgrid.jqID(this.name),b.grid.hDiv).val()){e[d]=j;g[d]=k;f++}else try{delete b.p.postData[d]}catch(s){}}});var n=f>0?true:false;if(c.stringResult===true||b.p.datatype=="local"){var m='{"groupOp":"'+c.groupOp+
|
187
|
+
'","rules":[',q=0;a.each(e,function(p,s){if(q>0)m+=",";m+='{"field":"'+p+'",';m+='"op":"'+g[p]+'",';s+="";m+='"data":"'+s.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"}';q++});m+="]}";a.extend(b.p.postData,{filters:m});a.each(["searchField","searchString","searchOper"],function(p,s){b.p.postData.hasOwnProperty(s)&&delete b.p.postData[s]})}else a.extend(b.p.postData,e);var l;if(b.p.searchurl){l=b.p.url;a(b).jqGrid("setGridParam",{url:b.p.searchurl})}var r=false;if(a.isFunction(c.beforeSearch))r=c.beforeSearch.call(b);
|
188
|
+
r||a(b).jqGrid("setGridParam",{search:n}).trigger("reloadGrid",[{page:1}]);l&&a(b).jqGrid("setGridParam",{url:l});a.isFunction(c.afterSearch)&&c.afterSearch()},o=a("<tr class='ui-search-toolbar' role='rowheader'></tr>"),t;a.each(b.p.colModel,function(){var e=this,f,j,d,g;j=a("<th role='columnheader' class='ui-state-default ui-th-column ui-th-"+b.p.direction+"'></th>");f=a("<div style='width:100%;position:relative;height:100%;padding-right:0.3em;'></div>");this.hidden===true&&a(j).css("display","none");
|
189
|
+
this.search=this.search===false?false:true;if(typeof this.stype=="undefined")this.stype="text";d=a.extend({},this.searchoptions||{});if(this.search)switch(this.stype){case "select":if(g=this.surl||d.dataUrl)a.ajax(a.extend({url:g,dataType:"html",complete:function(l){if(d.buildSelect!==undefined)(l=d.buildSelect(l))&&a(f).append(l);else a(f).append(l.responseText);d.defaultValue&&a("select",f).val(d.defaultValue);a("select",f).attr({name:e.index||e.name,id:"gs_"+e.name});d.attr&&a("select",f).attr(d.attr);
|
190
|
+
a("select",f).css({width:"100%"});d.dataInit!==undefined&&d.dataInit(a("select",f)[0]);d.dataEvents!==undefined&&h(a("select",f)[0],d.dataEvents);c.autosearch===true&&a("select",f).change(function(){i();return false});l=null}},a.jgrid.ajaxOptions,b.p.ajaxSelectOptions||{}));else{var k;if(e.searchoptions&&e.searchoptions.value)k=e.searchoptions.value;else if(e.editoptions&&e.editoptions.value)k=e.editoptions.value;if(k){g=document.createElement("select");g.style.width="100%";a(g).attr({name:e.index||
|
191
|
+
e.name,id:"gs_"+e.name});var n,m;if(typeof k==="string"){k=k.split(";");for(var q=0;q<k.length;q++){n=k[q].split(":");m=document.createElement("option");m.value=n[0];m.innerHTML=n[1];g.appendChild(m)}}else if(typeof k==="object")for(n in k)if(k.hasOwnProperty(n)){m=document.createElement("option");m.value=n;m.innerHTML=k[n];g.appendChild(m)}d.defaultValue&&a(g).val(d.defaultValue);d.attr&&a(g).attr(d.attr);d.dataInit!==undefined&&d.dataInit(g);d.dataEvents!==undefined&&h(g,d.dataEvents);a(f).append(g);
|
192
|
+
c.autosearch===true&&a(g).change(function(){i();return false})}}break;case "text":g=d.defaultValue?d.defaultValue:"";a(f).append("<input type='text' style='width:95%;padding:0px;' name='"+(e.index||e.name)+"' id='gs_"+e.name+"' value='"+g+"'/>");d.attr&&a("input",f).attr(d.attr);d.dataInit!==undefined&&d.dataInit(a("input",f)[0]);d.dataEvents!==undefined&&h(a("input",f)[0],d.dataEvents);if(c.autosearch===true)c.searchOnEnter?a("input",f).keypress(function(l){if((l.charCode?l.charCode:l.keyCode?l.keyCode:
|
193
|
+
0)==13){i();return false}return this}):a("input",f).keydown(function(l){switch(l.which){case 13:return false;case 9:case 16:case 37:case 38:case 39:case 40:case 27:break;default:t&&clearTimeout(t);t=setTimeout(function(){i()},500)}})}a(j).append(f);a(o).append(j)});a("table thead",b.grid.hDiv).append(o);this.ftoolbar=true;this.triggerToolbar=i;this.clearToolbar=function(e){var f={},j,d=0,g;e=typeof e!="boolean"?true:e;a.each(b.p.colModel,function(){j=this.searchoptions&&this.searchoptions.defaultValue?
|
194
|
+
this.searchoptions.defaultValue:"";g=this.index||this.name;switch(this.stype){case "select":var r;a("#gs_"+a.jgrid.jqID(g)+" option",b.grid.hDiv).each(function(u){if(u===0)this.selected=true;if(a(this).text()==j){this.selected=true;r=a(this).val();return false}});if(r){f[g]=r;d++}else try{delete b.p.postData[g]}catch(p){}break;case "text":a("#gs_"+a.jgrid.jqID(g),b.grid.hDiv).val(j);if(j){f[g]=j;d++}else try{delete b.p.postData[g]}catch(s){}}});var k=d>0?true:false;if(c.stringResult===true||b.p.datatype==
|
195
|
+
"local"){var n='{"groupOp":"'+c.groupOp+'","rules":[',m=0;a.each(f,function(r,p){if(m>0)n+=",";n+='{"field":"'+r+'",';n+='"op":"eq",';p+="";n+='"data":"'+p.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"}';m++});n+="]}";a.extend(b.p.postData,{filters:n});a.each(["searchField","searchString","searchOper"],function(r,p){b.p.postData.hasOwnProperty(p)&&delete b.p.postData[p]})}else a.extend(b.p.postData,f);var q;if(b.p.searchurl){q=b.p.url;a(b).jqGrid("setGridParam",{url:b.p.searchurl})}var l=false;if(a.isFunction(c.beforeClear))l=
|
196
|
+
c.beforeClear.call(b);l||e&&a(b).jqGrid("setGridParam",{search:k}).trigger("reloadGrid",[{page:1}]);q&&a(b).jqGrid("setGridParam",{url:q});a.isFunction(c.afterClear)&&c.afterClear()};this.toggleToolbar=function(){var e=a("tr.ui-search-toolbar",b.grid.hDiv);e.css("display")=="none"?e.show():e.hide()}}})}})})(jQuery);
|
197
|
+
(function(a){a.extend(a.jgrid,{showModal:function(b){b.w.show()},closeModal:function(b){b.w.hide().attr("aria-hidden","true");b.o&&b.o.remove()},hideModal:function(b,c){c=a.extend({jqm:true,gb:""},c||{});if(c.onClose){var d=c.onClose(b);if(typeof d=="boolean"&&!d)return}if(a.fn.jqm&&c.jqm===true)a(b).attr("aria-hidden","true").jqmHide();else{if(c.gb!=="")try{a(".jqgrid-overlay:first",c.gb).hide()}catch(f){}a(b).hide().attr("aria-hidden","true")}},findPos:function(b){var c=0,d=0;if(b.offsetParent){do{c+=
|
198
|
+
b.offsetLeft;d+=b.offsetTop}while(b=b.offsetParent)}return[c,d]},createModal:function(b,c,d,f,g,h,j){var e=document.createElement("div"),k,m=this;j=a.extend({},j||{});k=a(d.gbox).attr("dir")=="rtl"?true:false;e.className="ui-widget ui-widget-content ui-corner-all ui-jqdialog";e.id=b.themodal;var i=document.createElement("div");i.className="ui-jqdialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix";i.id=b.modalhead;a(i).append("<span class='ui-jqdialog-title'>"+d.caption+"</span>");var q=
|
199
|
+
a("<a href='javascript:void(0)' class='ui-jqdialog-titlebar-close ui-corner-all'></a>").hover(function(){q.addClass("ui-state-hover")},function(){q.removeClass("ui-state-hover")}).append("<span class='ui-icon ui-icon-closethick'></span>");a(i).append(q);if(k){e.dir="rtl";a(".ui-jqdialog-title",i).css("float","right");a(".ui-jqdialog-titlebar-close",i).css("left","0.3em")}else{e.dir="ltr";a(".ui-jqdialog-title",i).css("float","left");a(".ui-jqdialog-titlebar-close",i).css("right","0.3em")}var l=document.createElement("div");
|
200
|
+
a(l).addClass("ui-jqdialog-content ui-widget-content").attr("id",b.modalcontent);a(l).append(c);e.appendChild(l);a(e).prepend(i);if(h===true)a("body").append(e);else typeof h=="string"?a(h).append(e):a(e).insertBefore(f);a(e).css(j);if(typeof d.jqModal==="undefined")d.jqModal=true;c={};if(a.fn.jqm&&d.jqModal===true){if(d.left===0&&d.top===0&&d.overlay){j=[];j=this.findPos(g);d.left=j[0]+4;d.top=j[1]+4}c.top=d.top+"px";c.left=d.left}else if(d.left!==0||d.top!==0){c.left=d.left;c.top=d.top+"px"}a("a.ui-jqdialog-titlebar-close",
|
201
|
+
i).click(function(){var p=a("#"+b.themodal).data("onClose")||d.onClose,o=a("#"+b.themodal).data("gbox")||d.gbox;m.hideModal("#"+b.themodal,{gb:o,jqm:d.jqModal,onClose:p});return false});if(d.width===0||!d.width)d.width=300;if(d.height===0||!d.height)d.height=200;if(!d.zIndex){f=a(f).parents("*[role=dialog]").filter(":first").css("z-index");d.zIndex=f?parseInt(f,10)+1:950}f=0;if(k&&c.left&&!h){f=a(d.gbox).width()-(!isNaN(d.width)?parseInt(d.width,10):0)-8;c.left=parseInt(c.left,10)+parseInt(f,10)}if(c.left)c.left+=
|
202
|
+
"px";a(e).css(a.extend({width:isNaN(d.width)?"auto":d.width+"px",height:isNaN(d.height)?"auto":d.height+"px",zIndex:d.zIndex,overflow:"hidden"},c)).attr({tabIndex:"-1",role:"dialog","aria-labelledby":b.modalhead,"aria-hidden":"true"});if(typeof d.drag=="undefined")d.drag=true;if(typeof d.resize=="undefined")d.resize=true;if(d.drag){a(i).css("cursor","move");if(a.fn.jqDrag)a(e).jqDrag(i);else try{a(e).draggable({handle:a("#"+i.id)})}catch(n){}}if(d.resize)if(a.fn.jqResize){a(e).append("<div class='jqResize ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se ui-icon-grip-diagonal-se'></div>");
|
203
|
+
a("#"+b.themodal).jqResize(".jqResize",b.scrollelm?"#"+b.scrollelm:false)}else try{a(e).resizable({handles:"se, sw",alsoResize:b.scrollelm?"#"+b.scrollelm:false})}catch(r){}d.closeOnEscape===true&&a(e).keydown(function(p){if(p.which==27){p=a("#"+b.themodal).data("onClose")||d.onClose;m.hideModal(this,{gb:d.gbox,jqm:d.jqModal,onClose:p})}})},viewModal:function(b,c){c=a.extend({toTop:true,overlay:10,modal:false,onShow:this.showModal,onHide:this.closeModal,gbox:"",jqm:true,jqM:true},c||{});if(a.fn.jqm&&
|
204
|
+
c.jqm===true)c.jqM?a(b).attr("aria-hidden","false").jqm(c).jqmShow():a(b).attr("aria-hidden","false").jqmShow();else{if(c.gbox!==""){a(".jqgrid-overlay:first",c.gbox).show();a(b).data("gbox",c.gbox)}a(b).show().attr("aria-hidden","false");try{a(":input:visible",b)[0].focus()}catch(d){}}},info_dialog:function(b,c,d,f){var g={width:290,height:"auto",dataheight:"auto",drag:true,resize:false,caption:"<b>"+b+"</b>",left:250,top:170,zIndex:1E3,jqModal:true,modal:false,closeOnEscape:true,align:"center",
|
205
|
+
buttonalign:"center",buttons:[]};a.extend(g,f||{});var h=g.jqModal,j=this;if(a.fn.jqm&&!h)h=false;b="";if(g.buttons.length>0)for(f=0;f<g.buttons.length;f++){if(typeof g.buttons[f].id=="undefined")g.buttons[f].id="info_button_"+f;b+="<a href='javascript:void(0)' id='"+g.buttons[f].id+"' class='fm-button ui-state-default ui-corner-all'>"+g.buttons[f].text+"</a>"}f=isNaN(g.dataheight)?g.dataheight:g.dataheight+"px";var e="<div id='info_id'>";e+="<div id='infocnt' style='margin:0px;padding-bottom:1em;width:100%;overflow:auto;position:relative;height:"+
|
206
|
+
f+";"+("text-align:"+g.align+";")+"'>"+c+"</div>";e+=d?"<div class='ui-widget-content ui-helper-clearfix' style='text-align:"+g.buttonalign+";padding-bottom:0.8em;padding-top:0.5em;background-image: none;border-width: 1px 0 0 0;'><a href='javascript:void(0)' id='closedialog' class='fm-button ui-state-default ui-corner-all'>"+d+"</a>"+b+"</div>":b!==""?"<div class='ui-widget-content ui-helper-clearfix' style='text-align:"+g.buttonalign+";padding-bottom:0.8em;padding-top:0.5em;background-image: none;border-width: 1px 0 0 0;'>"+
|
207
|
+
b+"</div>":"";e+="</div>";try{a("#info_dialog").attr("aria-hidden")=="false"&&this.hideModal("#info_dialog",{jqm:h});a("#info_dialog").remove()}catch(k){}this.createModal({themodal:"info_dialog",modalhead:"info_head",modalcontent:"info_content",scrollelm:"infocnt"},e,g,"","",true);b&&a.each(g.buttons,function(i){a("#"+this.id,"#info_id").bind("click",function(){g.buttons[i].onClick.call(a("#info_dialog"));return false})});a("#closedialog","#info_id").click(function(){j.hideModal("#info_dialog",{jqm:h});
|
208
|
+
return false});a(".fm-button","#info_dialog").hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});a.isFunction(g.beforeOpen)&&g.beforeOpen();this.viewModal("#info_dialog",{onHide:function(i){i.w.hide().remove();i.o&&i.o.remove()},modal:g.modal,jqm:h});a.isFunction(g.afterOpen)&&g.afterOpen();try{a("#info_dialog").focus()}catch(m){}},createEl:function(b,c,d,f,g){function h(l,n){a.isFunction(n.dataInit)&&n.dataInit(l);n.dataEvents&&a.each(n.dataEvents,
|
209
|
+
function(){this.data!==undefined?a(l).bind(this.type,this.data,this.fn):a(l).bind(this.type,this.fn)});return n}function j(l,n,r){var p=["dataInit","dataEvents","dataUrl","buildSelect","sopt","searchhidden","defaultValue","attr"];if(typeof r!="undefined"&&a.isArray(r))p=a.extend(p,r);a.each(n,function(o,s){a.inArray(o,p)===-1&&a(l).attr(o,s)});n.hasOwnProperty("id")||a(l).attr("id",a.jgrid.randId())}var e="";switch(b){case "textarea":e=document.createElement("textarea");if(f)c.cols||a(e).css({width:"98%"});
|
210
|
+
else if(!c.cols)c.cols=20;if(!c.rows)c.rows=2;if(d==" "||d==" "||d.length==1&&d.charCodeAt(0)==160)d="";e.value=d;j(e,c);c=h(e,c);a(e).attr({role:"textbox",multiline:"true"});break;case "checkbox":e=document.createElement("input");e.type="checkbox";if(c.value){b=c.value.split(":");if(d===b[0]){e.checked=true;e.defaultChecked=true}e.value=b[0];a(e).attr("offval",b[1])}else{b=d.toLowerCase();if(b.search(/(false|0|no|off|undefined)/i)<0&&b!==""){e.checked=true;e.defaultChecked=true;e.value=
|
211
|
+
d}else e.value="on";a(e).attr("offval","off")}j(e,c,["value"]);c=h(e,c);a(e).attr("role","checkbox");break;case "select":e=document.createElement("select");e.setAttribute("role","select");f=[];if(c.multiple===true){b=true;e.multiple="multiple";a(e).attr("aria-multiselectable","true")}else b=false;if(typeof c.dataUrl!="undefined")a.ajax(a.extend({url:c.dataUrl,type:"GET",dataType:"html",context:{elem:e,options:c,vl:d},success:function(l){var n=[],r=this.elem,p=this.vl,o=a.extend({},this.options),s=
|
212
|
+
o.multiple===true;if(typeof o.buildSelect!="undefined")l=o.buildSelect(l);if(l=a(l).html()){a(r).append(l);j(r,o);o=h(r,o);if(typeof o.size==="undefined")o.size=s?3:1;if(s){n=p.split(",");n=a.map(n,function(t){return a.trim(t)})}else n[0]=a.trim(p);setTimeout(function(){a("option",r).each(function(){a(this).attr("role","option");if(a.inArray(a.trim(a(this).text()),n)>-1||a.inArray(a.trim(a(this).val()),n)>-1)this.selected="selected"})},0)}}},g||{}));else if(c.value){var k;if(b){f=d.split(",");f=a.map(f,
|
213
|
+
function(l){return a.trim(l)});if(typeof c.size==="undefined")c.size=3}else c.size=1;if(typeof c.value==="function")c.value=c.value();var m,i;if(typeof c.value==="string"){m=c.value.split(";");for(k=0;k<m.length;k++){i=m[k].split(":");if(i.length>2)i[1]=a.map(i,function(l,n){if(n>0)return l}).join(":");g=document.createElement("option");g.setAttribute("role","option");g.value=i[0];g.innerHTML=i[1];if(!b&&(a.trim(i[0])==a.trim(d)||a.trim(i[1])==a.trim(d)))g.selected="selected";if(b&&(a.inArray(a.trim(i[1]),
|
214
|
+
f)>-1||a.inArray(a.trim(i[0]),f)>-1))g.selected="selected";e.appendChild(g)}}else if(typeof c.value==="object"){m=c.value;for(k in m)if(m.hasOwnProperty(k)){g=document.createElement("option");g.setAttribute("role","option");g.value=k;g.innerHTML=m[k];if(!b&&(a.trim(k)==a.trim(d)||a.trim(m[k])==a.trim(d)))g.selected="selected";if(b&&(a.inArray(a.trim(m[k]),f)>-1||a.inArray(a.trim(k),f)>-1))g.selected="selected";e.appendChild(g)}}j(e,c,["value"]);c=h(e,c)}break;case "text":case "password":case "button":k=
|
215
|
+
b=="button"?"button":"textbox";e=document.createElement("input");e.type=b;e.value=d;j(e,c);c=h(e,c);if(b!="button")if(f)c.size||a(e).css({width:"98%"});else if(!c.size)c.size=20;a(e).attr("role",k);break;case "image":case "file":e=document.createElement("input");e.type=b;j(e,c);c=h(e,c);break;case "custom":e=document.createElement("span");try{if(a.isFunction(c.custom_element))if(m=c.custom_element.call(this,d,c)){m=a(m).addClass("customelement").attr({id:c.id,name:c.name});a(e).empty().append(m)}else throw"e2";
|
216
|
+
else throw"e1";}catch(q){q=="e1"&&this.info_dialog(a.jgrid.errors.errcap,"function 'custom_element' "+a.jgrid.edit.msg.nodefined,a.jgrid.edit.bClose);q=="e2"?this.info_dialog(a.jgrid.errors.errcap,"function 'custom_element' "+a.jgrid.edit.msg.novalue,a.jgrid.edit.bClose):this.info_dialog(a.jgrid.errors.errcap,typeof q==="string"?q:q.message,a.jgrid.edit.bClose)}}return e},checkDate:function(b,c){var d={},f;b=b.toLowerCase();f=b.indexOf("/")!=-1?"/":b.indexOf("-")!=-1?"-":b.indexOf(".")!=-1?".":"/";
|
217
|
+
b=b.split(f);c=c.split(f);if(c.length!=3)return false;f=-1;for(var g,h=-1,j=-1,e=0;e<b.length;e++){g=isNaN(c[e])?0:parseInt(c[e],10);d[b[e]]=g;g=b[e];if(g.indexOf("y")!=-1)f=e;if(g.indexOf("m")!=-1)j=e;if(g.indexOf("d")!=-1)h=e}g=b[f]=="y"||b[f]=="yyyy"?4:b[f]=="yy"?2:-1;e=function(m){for(var i=1;i<=m;i++){this[i]=31;if(i==4||i==6||i==9||i==11)this[i]=30;if(i==2)this[i]=29}return this}(12);var k;if(f===-1)return false;else{k=d[b[f]].toString();if(g==2&&k.length==1)g=1;if(k.length!=g||d[b[f]]===0&&
|
218
|
+
c[f]!="00")return false}if(j===-1)return false;else{k=d[b[j]].toString();if(k.length<1||d[b[j]]<1||d[b[j]]>12)return false}if(h===-1)return false;else{k=d[b[h]].toString();if(k.length<1||d[b[h]]<1||d[b[h]]>31||d[b[j]]==2&&d[b[h]]>(d[b[f]]%4===0&&(d[b[f]]%100!==0||d[b[f]]%400===0)?29:28)||d[b[h]]>e[d[b[j]]])return false}return true},isEmpty:function(b){return b.match(/^\s+$/)||b===""?true:false},checkTime:function(b){var c=/^(\d{1,2}):(\d{2})([ap]m)?$/;if(!this.isEmpty(b))if(b=b.match(c)){if(b[3]){if(b[1]<
|
219
|
+
1||b[1]>12)return false}else if(b[1]>23)return false;if(b[2]>59)return false}else return false;return true},checkValues:function(b,c,d,f,g){var h,j;if(typeof f==="undefined")if(typeof c=="string"){f=0;for(g=d.p.colModel.length;f<g;f++)if(d.p.colModel[f].name==c){h=d.p.colModel[f].editrules;c=f;try{j=d.p.colModel[f].formoptions.label}catch(e){}break}}else{if(c>=0)h=d.p.colModel[c].editrules}else{h=f;j=g===undefined?"_":g}if(h){j||(j=d.p.colNames[c]);if(h.required===true)if(this.isEmpty(b))return[false,
|
220
|
+
j+": "+a.jgrid.edit.msg.required,""];f=h.required===false?false:true;if(h.number===true)if(!(f===false&&this.isEmpty(b)))if(isNaN(b))return[false,j+": "+a.jgrid.edit.msg.number,""];if(typeof h.minValue!="undefined"&&!isNaN(h.minValue))if(parseFloat(b)<parseFloat(h.minValue))return[false,j+": "+a.jgrid.edit.msg.minValue+" "+h.minValue,""];if(typeof h.maxValue!="undefined"&&!isNaN(h.maxValue))if(parseFloat(b)>parseFloat(h.maxValue))return[false,j+": "+a.jgrid.edit.msg.maxValue+" "+h.maxValue,""];if(h.email===
|
221
|
+
true)if(!(f===false&&this.isEmpty(b))){g=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i;
|
222
|
+
if(!g.test(b))return[false,j+": "+a.jgrid.edit.msg.email,""]}if(h.integer===true)if(!(f===false&&this.isEmpty(b))){if(isNaN(b))return[false,j+": "+a.jgrid.edit.msg.integer,""];if(b%1!==0||b.indexOf(".")!=-1)return[false,j+": "+a.jgrid.edit.msg.integer,""]}if(h.date===true)if(!(f===false&&this.isEmpty(b))){c=d.p.colModel[c].formatoptions&&d.p.colModel[c].formatoptions.newformat?d.p.colModel[c].formatoptions.newformat:d.p.colModel[c].datefmt||"Y-m-d";if(!this.checkDate(c,b))return[false,j+": "+a.jgrid.edit.msg.date+
|
223
|
+
" - "+c,""]}if(h.time===true)if(!(f===false&&this.isEmpty(b)))if(!this.checkTime(b))return[false,j+": "+a.jgrid.edit.msg.date+" - hh:mm (am/pm)",""];if(h.url===true)if(!(f===false&&this.isEmpty(b))){g=/^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;if(!g.test(b))return[false,j+": "+a.jgrid.edit.msg.url,""]}if(h.custom===true)if(!(f===false&&this.isEmpty(b)))if(a.isFunction(h.custom_func)){b=h.custom_func.call(d,b,j);return a.isArray(b)?
|
224
|
+
b:[false,a.jgrid.edit.msg.customarray,""]}else return[false,a.jgrid.edit.msg.customfcheck,""]}return[true,"",""]}})})(jQuery);
|
225
|
+
(function(a){a.jgrid.extend({searchGrid:function(d){d=a.extend({recreateFilter:false,drag:true,sField:"searchField",sValue:"searchString",sOper:"searchOper",sFilter:"filters",loadDefaults:true,beforeShowSearch:null,afterShowSearch:null,onInitializeSearch:null,afterRedraw:null,closeAfterSearch:false,closeAfterReset:false,closeOnEscape:false,multipleSearch:false,multipleGroup:false,top:0,left:0,jqModal:true,modal:false,resize:false,width:450,height:"auto",dataheight:"auto",showQuery:false,errorcheck:true,
|
226
|
+
sopt:null,stringResult:undefined,onClose:null,onSearch:null,onReset:null,toTop:true,overlay:10,columns:[],tmplNames:null,tmplFilters:null,tmplLabel:" Template: ",showOnLoad:false,layer:null},a.jgrid.search,d||{});return this.each(function(){function b(){if(a.isFunction(d.beforeShowSearch)){E=d.beforeShowSearch(a("#"+n));if(typeof E==="undefined")E=true}if(E){a.jgrid.viewModal("#"+D.themodal,{gbox:"#gbox_"+n,jqm:d.jqModal,modal:d.modal,overlay:d.overlay,toTop:d.toTop});a.isFunction(d.afterShowSearch)&&
|
227
|
+
d.afterShowSearch(a("#"+n))}}var c=this;if(c.grid){var n="fbox_"+c.p.id,E=true,D={themodal:"searchmod"+n,modalhead:"searchhd"+n,modalcontent:"searchcnt"+n,scrollelm:n},F=c.p.postData[d.sFilter];if(typeof F==="string")F=a.jgrid.parse(F);d.recreateFilter===true&&a("#"+D.themodal).remove();if(a("#"+D.themodal).html()!==null)b();else{var s=a("<span><div id='"+n+"' class='searchFilter' style='overflow:auto'></div></span>").insertBefore("#gview_"+c.p.id);if(a.isFunction(d.onInitializeSearch))d.onInitializeSearch(a("#"+
|
228
|
+
n));var q=a.extend([],c.p.colModel),u="<a href='javascript:void(0)' id='"+n+"_search' class='fm-button ui-state-default ui-corner-all fm-button-icon-right ui-reset'><span class='ui-icon ui-icon-search'></span>"+d.Find+"</a>",p="<a href='javascript:void(0)' id='"+n+"_reset' class='fm-button ui-state-default ui-corner-all fm-button-icon-left ui-search'><span class='ui-icon ui-icon-arrowreturnthick-1-w'></span>"+d.Reset+"</a>",o="",t="",e,w=false,l=-1;if(d.showQuery)o="<a href='javascript:void(0)' id='"+
|
229
|
+
n+"_query' class='fm-button ui-state-default ui-corner-all fm-button-icon-left'><span class='ui-icon ui-icon-comment'></span>Query</a>";if(d.columns.length)q=d.columns;else a.each(q,function(m,v){if(!v.label)v.label=c.p.colNames[m];if(!w){var M=typeof v.search==="undefined"?true:v.search,B=v.hidden===true;if(v.searchoptions&&v.searchoptions.searchhidden===true&&M||M&&!B){w=true;e=v.index||v.name;l=m}}});if(!F&&e||d.multipleSearch===false){var k="eq";if(l>=0&&q[l].searchoptions&&q[l].searchoptions.sopt)k=
|
230
|
+
q[l].searchoptions.sopt[0];else if(d.sopt&&d.sopt.length)k=d.sopt[0];F={groupOp:"AND",rules:[{field:e,op:k,data:""}]}}w=false;if(d.tmplNames&&d.tmplNames.length){w=true;t=d.tmplLabel;t+="<select class='ui-template'>";t+="<option value='default'>Default</option>";a.each(d.tmplNames,function(m,v){t+="<option value='"+m+"'>"+v+"</option>"});t+="</select>"}u="<table class='EditTable' style='border:0px none;margin-top:5px' id='"+n+"_2'><tbody><tr><td colspan='2'><hr class='ui-widget-content' style='margin:1px'/></td></tr><tr><td class='EditButton' style='text-align:left'>"+
|
231
|
+
p+t+"</td><td class='EditButton'>"+o+u+"</td></tr></tbody></table>";a("#"+n).jqFilter({columns:q,filter:d.loadDefaults?F:null,showQuery:d.showQuery,errorcheck:d.errorcheck,sopt:d.sopt,groupButton:d.multipleGroup,ruleButtons:d.multipleSearch,afterRedraw:d.afterRedraw,_gridsopt:a.jgrid.search.odata,onChange:function(){this.p.showQuery&&a(".query",this).html(this.toUserFriendlyString())}});s.append(u);w&&d.tmplFilters&&d.tmplFilters.length&&a(".ui-template",s).bind("change",function(){var m=a(this).val();
|
232
|
+
m=="default"?a("#"+n).jqFilter("addFilter",F):a("#"+n).jqFilter("addFilter",d.tmplFilters[parseInt(m,10)]);return false});if(d.multipleGroup===true)d.multipleSearch=true;if(a.isFunction(d.onInitializeSearch))d.onInitializeSearch(a("#"+n));d.layer?a.jgrid.createModal(D,s,d,"#gview_"+c.p.id,a("#gbox_"+c.p.id)[0],"#"+d.layer,{position:"relative"}):a.jgrid.createModal(D,s,d,"#gview_"+c.p.id,a("#gbox_"+c.p.id)[0]);o&&a("#"+n+"_query").bind("click",function(){a(".queryresult",s).toggle();return false});
|
233
|
+
if(d.stringResult===undefined)d.stringResult=d.multipleSearch;a("#"+n+"_search").bind("click",function(){var m=a("#"+n),v={},M,B=m.jqFilter("filterData");if(d.errorcheck){m[0].hideError();d.showQuery||m.jqFilter("toSQLString");if(m[0].p.error){m[0].showError();return false}}if(d.stringResult){try{M=xmlJsonClass.toJson(B,"","",false)}catch(U){try{M=JSON.stringify(B)}catch(g){}}if(typeof M==="string"){v[d.sFilter]=M;a.each([d.sField,d.sValue,d.sOper],function(){v[this]=""})}}else if(d.multipleSearch){v[d.sFilter]=
|
234
|
+
B;a.each([d.sField,d.sValue,d.sOper],function(){v[this]=""})}else{v[d.sField]=B.rules[0].field;v[d.sValue]=B.rules[0].data;v[d.sOper]=B.rules[0].op;v[d.sFilter]=""}c.p.search=true;a.extend(c.p.postData,v);if(a.isFunction(d.onSearch))d.onSearch();a(c).trigger("reloadGrid",[{page:1}]);d.closeAfterSearch&&a.jgrid.hideModal("#"+D.themodal,{gb:"#gbox_"+c.p.id,jqm:d.jqModal,onClose:d.onClose});return false});a("#"+n+"_reset").bind("click",function(){var m={},v=a("#"+n);c.p.search=false;if(d.multipleSearch===
|
235
|
+
false)m[d.sField]=m[d.sValue]=m[d.sOper]="";else m[d.sFilter]="";v[0].resetFilter();w&&a(".ui-template",s).val("default");a.extend(c.p.postData,m);if(a.isFunction(d.onReset))d.onReset();a(c).trigger("reloadGrid",[{page:1}]);return false});b();a(".fm-button:not(.ui-state-disabled)",s).hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")})}}})},editGridRow:function(d,b){var c=b=a.extend({top:0,left:0,width:300,height:"auto",dataheight:"auto",modal:false,
|
236
|
+
overlay:10,drag:true,resize:true,url:null,mtype:"POST",clearAfterAdd:true,closeAfterEdit:false,reloadAfterSubmit:true,onInitializeForm:null,beforeInitData:null,beforeShowForm:null,afterShowForm:null,beforeSubmit:null,afterSubmit:null,onclickSubmit:null,afterComplete:null,onclickPgButtons:null,afterclickPgButtons:null,editData:{},recreateForm:false,jqModal:true,closeOnEscape:false,addedrow:"first",topinfo:"",bottominfo:"",saveicon:[],closeicon:[],savekey:[false,13],navkeys:[false,38,40],checkOnSubmit:false,
|
237
|
+
checkOnUpdate:false,_savedData:{},processing:false,onClose:null,ajaxEditOptions:{},serializeEditData:null,viewPagerButtons:true},a.jgrid.edit,b||{});return this.each(function(){function n(){a("#"+k+" > tbody > tr > td > .FormElement").each(function(){var f=a(".customelement",this);if(f.length){var h=a(f[0]).attr("name");a.each(e.p.colModel,function(){if(this.name===h&&this.editoptions&&a.isFunction(this.editoptions.custom_value)){try{j[h]=this.editoptions.custom_value(a("#"+a.jgrid.jqID(h),"#"+k),
|
238
|
+
"get");if(j[h]===undefined)throw"e1";}catch(r){r==="e1"?a.jgrid.info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_value' "+a.jgrid.edit.msg.novalue,jQuery.jgrid.edit.bClose):a.jgrid.info_dialog(jQuery.jgrid.errors.errcap,r.message,jQuery.jgrid.edit.bClose)}return true}})}else{switch(a(this).get(0).type){case "checkbox":if(a(this).attr("checked"))j[this.name]=a(this).val();else{f=a(this).attr("offval");j[this.name]=f}break;case "select-one":j[this.name]=a("option:selected",this).val();J[this.name]=
|
239
|
+
a("option:selected",this).text();break;case "select-multiple":j[this.name]=a(this).val();j[this.name]=j[this.name]?j[this.name].join(","):"";var x=[];a("option:selected",this).each(function(r,H){x[r]=a(H).text()});J[this.name]=x.join(",");break;case "password":case "text":case "textarea":case "button":j[this.name]=a(this).val()}if(e.p.autoencode)j[this.name]=a.jgrid.htmlEncode(j[this.name])}});return true}function E(f,h,x,r){var H,C,z,I=0,y,N,G,V=[],K=false,aa="",O;for(O=1;O<=r;O++)aa+="<td class='CaptionTD'> </td><td class='DataTD'> </td>";
|
240
|
+
if(f!="_empty")K=a(h).jqGrid("getInd",f);a(h.p.colModel).each(function(T){H=this.name;N=(C=this.editrules&&this.editrules.edithidden===true?false:this.hidden===true?true:false)?"style='display:none'":"";if(H!=="cb"&&H!=="subgrid"&&this.editable===true&&H!=="rn"){if(K===false)y="";else if(H==h.p.ExpandColumn&&h.p.treeGrid===true)y=a("td:eq("+T+")",h.rows[K]).text();else{try{y=a.unformat(a("td:eq("+T+")",h.rows[K]),{rowId:f,colModel:this},T)}catch(fa){y=this.edittype&&this.edittype=="textarea"?a("td:eq("+
|
241
|
+
T+")",h.rows[K]).text():a("td:eq("+T+")",h.rows[K]).html()}if(!y||y==" "||y==" "||y.length==1&&y.charCodeAt(0)==160)y=""}var Y=a.extend({},this.editoptions||{},{id:H,name:H}),Z=a.extend({},{elmprefix:"",elmsuffix:"",rowabove:false,rowcontent:""},this.formoptions||{}),da=parseInt(Z.rowpos,10)||I+1,ga=parseInt((parseInt(Z.colpos,10)||1)*2,10);if(f=="_empty"&&Y.defaultValue)y=a.isFunction(Y.defaultValue)?Y.defaultValue():Y.defaultValue;if(!this.edittype)this.edittype="text";if(e.p.autoencode)y=
|
242
|
+
a.jgrid.htmlDecode(y);G=a.jgrid.createEl(this.edittype,Y,y,false,a.extend({},a.jgrid.ajaxOptions,h.p.ajaxSelectOptions||{}));if(y===""&&this.edittype=="checkbox")y=a(G).attr("offval");if(y===""&&this.edittype=="select")y=a("option:eq(0)",G).text();if(c.checkOnSubmit||c.checkOnUpdate)c._savedData[H]=y;a(G).addClass("FormElement");if(this.edittype=="text"||this.edittype=="textarea")a(G).addClass("ui-widget-content ui-corner-all");z=a(x).find("tr[rowpos="+da+"]");if(Z.rowabove){Y=a("<tr><td class='contentinfo' colspan='"+
|
243
|
+
r*2+"'>"+Z.rowcontent+"</td></tr>");a(x).append(Y);Y[0].rp=da}if(z.length===0){z=a("<tr "+N+" rowpos='"+da+"'></tr>").addClass("FormData").attr("id","tr_"+H);a(z).append(aa);a(x).append(z);z[0].rp=da}a("td:eq("+(ga-2)+")",z[0]).html(typeof Z.label==="undefined"?h.p.colNames[T]:Z.label);a("td:eq("+(ga-1)+")",z[0]).append(Z.elmprefix).append(G).append(Z.elmsuffix);V[I]=T;I++}});if(I>0){O=a("<tr class='FormData' style='display:none'><td class='CaptionTD'></td><td colspan='"+(r*2-1)+"' class='DataTD'><input class='FormElement' id='id_g' type='text' name='"+
|
244
|
+
h.p.id+"_id' value='"+f+"'/></td></tr>");O[0].rp=I+999;a(x).append(O);if(c.checkOnSubmit||c.checkOnUpdate)c._savedData[h.p.id+"_id"]=f}return V}function D(f,h,x){var r,H=0,C,z,I,y,N;if(c.checkOnSubmit||c.checkOnUpdate){c._savedData={};c._savedData[h.p.id+"_id"]=f}var G=h.p.colModel;if(f=="_empty"){a(G).each(function(){r=this.name;I=a.extend({},this.editoptions||{});if((z=a("#"+a.jgrid.jqID(r),"#"+x))&&z.length&&z[0]!==null){y="";if(I.defaultValue){y=a.isFunction(I.defaultValue)?I.defaultValue():I.defaultValue;
|
245
|
+
if(z[0].type=="checkbox"){N=y.toLowerCase();if(N.search(/(false|0|no|off|undefined)/i)<0&&N!==""){z[0].checked=true;z[0].defaultChecked=true;z[0].value=y}else z.attr({checked:"",defaultChecked:""})}else z.val(y)}else if(z[0].type=="checkbox"){z[0].checked=false;z[0].defaultChecked=false;y=a(z).attr("offval")}else if(z[0].type&&z[0].type.substr(0,6)=="select")z[0].selectedIndex=0;else z.val(y);if(c.checkOnSubmit===true||c.checkOnUpdate)c._savedData[r]=y}});a("#id_g","#"+x).val(f)}else{var V=a(h).jqGrid("getInd",
|
246
|
+
f,true);if(V){a("td",V).each(function(K){r=G[K].name;if(r!=="cb"&&r!=="subgrid"&&r!=="rn"&&G[K].editable===true){if(r==h.p.ExpandColumn&&h.p.treeGrid===true)C=a(this).text();else try{C=a.unformat(a(this),{rowId:f,colModel:G[K]},K)}catch(aa){C=G[K].edittype=="textarea"?a(this).text():a(this).html()}if(e.p.autoencode)C=a.jgrid.htmlDecode(C);if(c.checkOnSubmit===true||c.checkOnUpdate)c._savedData[r]=C;r=a.jgrid.jqID(r);switch(G[K].edittype){case "password":case "text":case "button":case "image":case "textarea":if(C==
|
247
|
+
" "||C==" "||C.length==1&&C.charCodeAt(0)==160)C="";a("#"+r,"#"+x).val(C);break;case "select":var O=C.split(",");O=a.map(O,function(fa){return a.trim(fa)});a("#"+r+" option","#"+x).each(function(){this.selected=!G[K].editoptions.multiple&&(O[0]==a.trim(a(this).text())||O[0]==a.trim(a(this).val()))?true:G[K].editoptions.multiple?a.inArray(a.trim(a(this).text()),O)>-1||a.inArray(a.trim(a(this).val()),O)>-1?true:false:false});break;case "checkbox":C+="";if(G[K].editoptions&&G[K].editoptions.value)if(G[K].editoptions.value.split(":")[0]==
|
248
|
+
C){a("#"+r,"#"+x).attr("checked",true);a("#"+r,"#"+x).attr("defaultChecked",true)}else{a("#"+r,"#"+x).attr("checked",false);a("#"+r,"#"+x).attr("defaultChecked","")}else{C=C.toLowerCase();if(C.search(/(false|0|no|off|undefined)/i)<0&&C!==""){a("#"+r,"#"+x).attr("checked",true);a("#"+r,"#"+x).attr("defaultChecked",true)}else{a("#"+r,"#"+x).attr("checked",false);a("#"+r,"#"+x).attr("defaultChecked","")}}break;case "custom":try{if(G[K].editoptions&&a.isFunction(G[K].editoptions.custom_value))G[K].editoptions.custom_value(a("#"+
|
249
|
+
r,"#"+x),"set",C);else throw"e1";}catch(T){T=="e1"?a.jgrid.info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_value' "+a.jgrid.edit.msg.nodefined,jQuery.jgrid.edit.bClose):a.jgrid.info_dialog(jQuery.jgrid.errors.errcap,T.message,jQuery.jgrid.edit.bClose)}}H++}});H>0&&a("#id_g","#"+k).val(f)}}}function F(){var f,h=[true,"",""],x={},r=e.p.prmNames,H,C,z,I;if(a.isFunction(c.beforeCheckValues)){var y=c.beforeCheckValues(j,a("#"+l),j[e.p.id+"_id"]=="_empty"?r.addoper:r.editoper);if(y&&typeof y===
|
250
|
+
"object")j=y}for(z in j)if(j.hasOwnProperty(z)){h=a.jgrid.checkValues(j[z],z,e);if(h[0]===false)break}if(h[0]){if(a.isFunction(c.onclickSubmit))x=c.onclickSubmit(c,j)||{};if(a.isFunction(c.beforeSubmit))h=c.beforeSubmit(j,a("#"+l))}if(h[0]&&!c.processing){c.processing=true;a("#sData","#"+k+"_2").addClass("ui-state-active");C=r.oper;H=r.id;j[C]=a.trim(j[e.p.id+"_id"])=="_empty"?r.addoper:r.editoper;if(j[C]!=r.addoper)j[H]=j[e.p.id+"_id"];else if(j[H]===undefined)j[H]=j[e.p.id+"_id"];delete j[e.p.id+
|
251
|
+
"_id"];j=a.extend(j,c.editData,x);if(e.p.treeGrid===true){if(j[C]==r.addoper){I=a(e).jqGrid("getGridParam","selrow");j[e.p.treeGridModel=="adjacency"?e.p.treeReader.parent_id_field:"parent_id"]=I}for(i in e.p.treeReader){x=e.p.treeReader[i];if(j.hasOwnProperty(x))j[C]==r.addoper&&i==="parent_id_field"||delete j[x]}}x=a.extend({url:c.url?c.url:a(e).jqGrid("getGridParam","editurl"),type:c.mtype,data:a.isFunction(c.serializeEditData)?c.serializeEditData(j):j,complete:function(N,G){if(G!="success"){h[0]=
|
252
|
+
false;h[1]=a.isFunction(c.errorTextFormat)?c.errorTextFormat(N):G+" Status: '"+N.statusText+"'. Error code: "+N.status}else if(a.isFunction(c.afterSubmit))h=c.afterSubmit(N,j);if(h[0]===false){a("#FormError>td","#"+k).html(h[1]);a("#FormError","#"+k).show()}else{a.each(e.p.colModel,function(){if(J[this.name]&&this.formatter&&this.formatter=="select")try{delete J[this.name]}catch(aa){}});j=a.extend(j,J);e.p.autoencode&&a.each(j,function(aa,O){j[aa]=a.jgrid.htmlDecode(O)});c.reloadAfterSubmit=c.reloadAfterSubmit&&
|
253
|
+
e.p.datatype!="local";if(j[C]==r.addoper){h[2]||(h[2]=a.jgrid.randId());j[H]=h[2];if(c.closeAfterAdd){if(c.reloadAfterSubmit)a(e).trigger("reloadGrid");else if(e.p.treeGrid===true)a(e).jqGrid("addChildNode",h[2],I,j);else{a(e).jqGrid("addRowData",h[2],j,b.addedrow);a(e).jqGrid("setSelection",h[2])}a.jgrid.hideModal("#"+m.themodal,{gb:"#gbox_"+w,jqm:b.jqModal,onClose:c.onClose})}else if(c.clearAfterAdd){if(c.reloadAfterSubmit)a(e).trigger("reloadGrid");else e.p.treeGrid===true?a(e).jqGrid("addChildNode",
|
254
|
+
h[2],I,j):a(e).jqGrid("addRowData",h[2],j,b.addedrow);D("_empty",e,l)}else if(c.reloadAfterSubmit)a(e).trigger("reloadGrid");else e.p.treeGrid===true?a(e).jqGrid("addChildNode",h[2],I,j):a(e).jqGrid("addRowData",h[2],j,b.addedrow)}else{if(c.reloadAfterSubmit){a(e).trigger("reloadGrid");c.closeAfterEdit||setTimeout(function(){a(e).jqGrid("setSelection",j[H])},1E3)}else e.p.treeGrid===true?a(e).jqGrid("setTreeRow",j[H],j):a(e).jqGrid("setRowData",j[H],j);c.closeAfterEdit&&a.jgrid.hideModal("#"+m.themodal,
|
255
|
+
{gb:"#gbox_"+w,jqm:b.jqModal,onClose:c.onClose})}if(a.isFunction(c.afterComplete)){f=N;setTimeout(function(){c.afterComplete(f,j,a("#"+l));f=null},500)}if(c.checkOnSubmit||c.checkOnUpdate){a("#"+l).data("disabled",false);if(c._savedData[e.p.id+"_id"]!="_empty")for(var V in c._savedData)if(j[V])c._savedData[V]=j[V]}}c.processing=false;a("#sData","#"+k+"_2").removeClass("ui-state-active");try{a(":input:visible","#"+l)[0].focus()}catch(K){}}},a.jgrid.ajaxOptions,c.ajaxEditOptions);if(!x.url&&!c.useDataProxy)if(a.isFunction(e.p.dataProxy))c.useDataProxy=
|
256
|
+
true;else{h[0]=false;h[1]+=" "+a.jgrid.errors.nourl}if(h[0])c.useDataProxy?e.p.dataProxy.call(e,x,"set_"+e.p.id):a.ajax(x)}if(h[0]===false){a("#FormError>td","#"+k).html(h[1]);a("#FormError","#"+k).show()}}function s(f,h){var x=false,r;for(r in f)if(f[r]!=h[r]){x=true;break}return x}function q(){a.each(e.p.colModel,function(f,h){if(h.editoptions&&h.editoptions.NullIfEmpty===true)if(j.hasOwnProperty(h.name)&&j[h.name]=="")j[h.name]="null"})}function u(){var f=true;a("#FormError","#"+k).hide();if(c.checkOnUpdate){j=
|
257
|
+
{};J={};n();S=a.extend({},j,J);if(P=s(S,c._savedData)){a("#"+l).data("disabled",true);a(".confirm","#"+m.themodal).show();f=false}else q()}return f}function p(){if(d!=="_empty"&&typeof e.p.savedRow!=="undefined"&&e.p.savedRow.length>0&&a.isFunction(a.fn.jqGrid.restoreRow))for(var f=0;f<e.p.savedRow.length;f++)if(e.p.savedRow[f].id==d){a(e).jqGrid("restoreRow",d);break}}function o(f,h){f===0?a("#pData","#"+k+"_2").addClass("ui-state-disabled"):a("#pData","#"+k+"_2").removeClass("ui-state-disabled");
|
258
|
+
f==h?a("#nData","#"+k+"_2").addClass("ui-state-disabled"):a("#nData","#"+k+"_2").removeClass("ui-state-disabled")}function t(){var f=a(e).jqGrid("getDataIDs"),h=a("#id_g","#"+k).val();return[a.inArray(h,f),f]}var e=this;if(e.grid&&d){var w=e.p.id,l="FrmGrid_"+w,k="TblGrid_"+w,m={themodal:"editmod"+w,modalhead:"edithd"+w,modalcontent:"editcnt"+w,scrollelm:l},v=a.isFunction(c.beforeShowForm)?c.beforeShowForm:false,M=a.isFunction(c.afterShowForm)?c.afterShowForm:false,B=a.isFunction(c.beforeInitData)?
|
259
|
+
c.beforeInitData:false,U=a.isFunction(c.onInitializeForm)?c.onInitializeForm:false,g=true,A=1,L=0,j,J,S,P;if(d==="new"){d="_empty";b.caption=c.addCaption}else b.caption=c.editCaption;b.recreateForm===true&&a("#"+m.themodal).html()!==null&&a("#"+m.themodal).remove();var Q=true;if(b.checkOnUpdate&&b.jqModal&&!b.modal)Q=false;if(a("#"+m.themodal).html()!==null){if(B){g=B(a("#"+l));if(typeof g=="undefined")g=true}if(g===false)return;p();a(".ui-jqdialog-title","#"+m.modalhead).html(b.caption);a("#FormError",
|
260
|
+
"#"+k).hide();if(c.topinfo){a(".topinfo","#"+k+"_2").html(c.topinfo);a(".tinfo","#"+k+"_2").show()}else a(".tinfo","#"+k+"_2").hide();if(c.bottominfo){a(".bottominfo","#"+k+"_2").html(c.bottominfo);a(".binfo","#"+k+"_2").show()}else a(".binfo","#"+k+"_2").hide();D(d,e,l);d=="_empty"||!c.viewPagerButtons?a("#pData, #nData","#"+k+"_2").hide():a("#pData, #nData","#"+k+"_2").show();if(c.processing===true){c.processing=false;a("#sData","#"+k+"_2").removeClass("ui-state-active")}if(a("#"+l).data("disabled")===
|
261
|
+
true){a(".confirm","#"+m.themodal).hide();a("#"+l).data("disabled",false)}v&&v(a("#"+l));a("#"+m.themodal).data("onClose",c.onClose);a.jgrid.viewModal("#"+m.themodal,{gbox:"#gbox_"+w,jqm:b.jqModal,jqM:false,overlay:b.overlay,modal:b.modal});Q||a(".jqmOverlay").click(function(){if(!u())return false;a.jgrid.hideModal("#"+m.themodal,{gb:"#gbox_"+w,jqm:b.jqModal,onClose:c.onClose});return false});M&&M(a("#"+l))}else{var R=isNaN(b.dataheight)?b.dataheight:b.dataheight+"px";R=a("<form name='FormPost' id='"+
|
262
|
+
l+"' class='FormGrid' onSubmit='return false;' style='width:100%;overflow:auto;position:relative;height:"+R+";'></form>").data("disabled",false);var W=a("<table id='"+k+"' class='EditTable' cellspacing='0' cellpadding='0' border='0'><tbody></tbody></table>");if(B){g=B(a("#"+l));if(typeof g=="undefined")g=true}if(g===false)return;p();a(e.p.colModel).each(function(){var f=this.formoptions;A=Math.max(A,f?f.colpos||0:0);L=Math.max(L,f?f.rowpos||0:0)});a(R).append(W);B=a("<tr id='FormError' style='display:none'><td class='ui-state-error' colspan='"+
|
263
|
+
A*2+"'></td></tr>");B[0].rp=0;a(W).append(B);B=a("<tr style='display:none' class='tinfo'><td class='topinfo' colspan='"+A*2+"'>"+c.topinfo+"</td></tr>");B[0].rp=0;a(W).append(B);g=(B=e.p.direction=="rtl"?true:false)?"nData":"pData";var X=B?"pData":"nData";E(d,e,W,A);g="<a href='javascript:void(0)' id='"+g+"' class='fm-button ui-state-default ui-corner-left'><span class='ui-icon ui-icon-triangle-1-w'></span></a>";X="<a href='javascript:void(0)' id='"+X+"' class='fm-button ui-state-default ui-corner-right'><span class='ui-icon ui-icon-triangle-1-e'></span></a>";
|
264
|
+
var $="<a href='javascript:void(0)' id='sData' class='fm-button ui-state-default ui-corner-all'>"+b.bSubmit+"</a>",ca="<a href='javascript:void(0)' id='cData' class='fm-button ui-state-default ui-corner-all'>"+b.bCancel+"</a>";g="<table border='0' cellspacing='0' cellpadding='0' class='EditTable' id='"+k+"_2'><tbody><tr><td colspan='2'><hr class='ui-widget-content' style='margin:1px'/></td></tr><tr id='Act_Buttons'><td class='navButton'>"+(B?X+g:g+X)+"</td><td class='EditButton'>"+$+ca+"</td></tr>";
|
265
|
+
g+="<tr style='display:none' class='binfo'><td class='bottominfo' colspan='2'>"+c.bottominfo+"</td></tr>";g+="</tbody></table>";if(L>0){var ba=[];a.each(a(W)[0].rows,function(f,h){ba[f]=h});ba.sort(function(f,h){if(f.rp>h.rp)return 1;if(f.rp<h.rp)return-1;return 0});a.each(ba,function(f,h){a("tbody",W).append(h)})}b.gbox="#gbox_"+w;var ea=false;if(b.closeOnEscape===true){b.closeOnEscape=false;ea=true}R=a("<span></span>").append(R).append(g);a.jgrid.createModal(m,R,b,"#gview_"+e.p.id,a("#gbox_"+e.p.id)[0]);
|
266
|
+
if(B){a("#pData, #nData","#"+k+"_2").css("float","right");a(".EditButton","#"+k+"_2").css("text-align","left")}c.topinfo&&a(".tinfo","#"+k+"_2").show();c.bottominfo&&a(".binfo","#"+k+"_2").show();g=R=null;a("#"+m.themodal).keydown(function(f){var h=f.target;if(a("#"+l).data("disabled")===true)return false;if(c.savekey[0]===true&&f.which==c.savekey[1])if(h.tagName!="TEXTAREA"){a("#sData","#"+k+"_2").trigger("click");return false}if(f.which===27){if(!u())return false;ea&&a.jgrid.hideModal(this,{gb:b.gbox,
|
267
|
+
jqm:b.jqModal,onClose:c.onClose});return false}if(c.navkeys[0]===true){if(a("#id_g","#"+k).val()=="_empty")return true;if(f.which==c.navkeys[1]){a("#pData","#"+k+"_2").trigger("click");return false}if(f.which==c.navkeys[2]){a("#nData","#"+k+"_2").trigger("click");return false}}});if(b.checkOnUpdate){a("a.ui-jqdialog-titlebar-close span","#"+m.themodal).removeClass("jqmClose");a("a.ui-jqdialog-titlebar-close","#"+m.themodal).unbind("click").click(function(){if(!u())return false;a.jgrid.hideModal("#"+
|
268
|
+
m.themodal,{gb:"#gbox_"+w,jqm:b.jqModal,onClose:c.onClose});return false})}b.saveicon=a.extend([true,"left","ui-icon-disk"],b.saveicon);b.closeicon=a.extend([true,"left","ui-icon-close"],b.closeicon);if(b.saveicon[0]===true)a("#sData","#"+k+"_2").addClass(b.saveicon[1]=="right"?"fm-button-icon-right":"fm-button-icon-left").append("<span class='ui-icon "+b.saveicon[2]+"'></span>");if(b.closeicon[0]===true)a("#cData","#"+k+"_2").addClass(b.closeicon[1]=="right"?"fm-button-icon-right":"fm-button-icon-left").append("<span class='ui-icon "+
|
269
|
+
b.closeicon[2]+"'></span>");if(c.checkOnSubmit||c.checkOnUpdate){$="<a href='javascript:void(0)' id='sNew' class='fm-button ui-state-default ui-corner-all' style='z-index:1002'>"+b.bYes+"</a>";X="<a href='javascript:void(0)' id='nNew' class='fm-button ui-state-default ui-corner-all' style='z-index:1002'>"+b.bNo+"</a>";ca="<a href='javascript:void(0)' id='cNew' class='fm-button ui-state-default ui-corner-all' style='z-index:1002'>"+b.bExit+"</a>";R=b.zIndex||999;R++;a("<div class='ui-widget-overlay jqgrid-overlay confirm' style='z-index:"+
|
270
|
+
R+";display:none;'> "+(a.browser.msie&&a.browser.version==6?'<iframe style="display:block;position:absolute;z-index:-1;filter:Alpha(Opacity=\'0\');" src="javascript:false;"></iframe>':"")+"</div><div class='confirm ui-widget-content ui-jqconfirm' style='z-index:"+(R+1)+"'>"+b.saveData+"<br/><br/>"+$+X+ca+"</div>").insertAfter("#"+l);a("#sNew","#"+m.themodal).click(function(){F();a("#"+l).data("disabled",false);a(".confirm","#"+m.themodal).hide();return false});a("#nNew","#"+m.themodal).click(function(){a(".confirm",
|
271
|
+
"#"+m.themodal).hide();a("#"+l).data("disabled",false);setTimeout(function(){a(":input","#"+l)[0].focus()},0);return false});a("#cNew","#"+m.themodal).click(function(){a(".confirm","#"+m.themodal).hide();a("#"+l).data("disabled",false);a.jgrid.hideModal("#"+m.themodal,{gb:"#gbox_"+w,jqm:b.jqModal,onClose:c.onClose});return false})}U&&U(a("#"+l));d=="_empty"||!c.viewPagerButtons?a("#pData,#nData","#"+k+"_2").hide():a("#pData,#nData","#"+k+"_2").show();v&&v(a("#"+l));a("#"+m.themodal).data("onClose",
|
272
|
+
c.onClose);a.jgrid.viewModal("#"+m.themodal,{gbox:"#gbox_"+w,jqm:b.jqModal,overlay:b.overlay,modal:b.modal});Q||a(".jqmOverlay").click(function(){if(!u())return false;a.jgrid.hideModal("#"+m.themodal,{gb:"#gbox_"+w,jqm:b.jqModal,onClose:c.onClose});return false});M&&M(a("#"+l));a(".fm-button","#"+m.themodal).hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});a("#sData","#"+k+"_2").click(function(){j={};J={};a("#FormError","#"+k).hide();n();q();
|
273
|
+
if(j[e.p.id+"_id"]=="_empty")F();else if(b.checkOnSubmit===true){S=a.extend({},j,J);if(P=s(S,c._savedData)){a("#"+l).data("disabled",true);a(".confirm","#"+m.themodal).show()}else F()}else F();return false});a("#cData","#"+k+"_2").click(function(){if(!u())return false;a.jgrid.hideModal("#"+m.themodal,{gb:"#gbox_"+w,jqm:b.jqModal,onClose:c.onClose});return false});a("#nData","#"+k+"_2").click(function(){if(!u())return false;a("#FormError","#"+k).hide();var f=t();f[0]=parseInt(f[0],10);if(f[0]!=-1&&
|
274
|
+
f[1][f[0]+1]){if(a.isFunction(b.onclickPgButtons))b.onclickPgButtons("next",a("#"+l),f[1][f[0]]);D(f[1][f[0]+1],e,l);a(e).jqGrid("setSelection",f[1][f[0]+1]);a.isFunction(b.afterclickPgButtons)&&b.afterclickPgButtons("next",a("#"+l),f[1][f[0]+1]);o(f[0]+1,f[1].length-1)}return false});a("#pData","#"+k+"_2").click(function(){if(!u())return false;a("#FormError","#"+k).hide();var f=t();if(f[0]!=-1&&f[1][f[0]-1]){if(a.isFunction(b.onclickPgButtons))b.onclickPgButtons("prev",a("#"+l),f[1][f[0]]);D(f[1][f[0]-
|
275
|
+
1],e,l);a(e).jqGrid("setSelection",f[1][f[0]-1]);a.isFunction(b.afterclickPgButtons)&&b.afterclickPgButtons("prev",a("#"+l),f[1][f[0]-1]);o(f[0]-1,f[1].length-1)}return false})}v=t();o(v[0],v[1].length-1)}})},viewGridRow:function(d,b){b=a.extend({top:0,left:0,width:0,height:"auto",dataheight:"auto",modal:false,overlay:10,drag:true,resize:true,jqModal:true,closeOnEscape:false,labelswidth:"30%",closeicon:[],navkeys:[false,38,40],onClose:null,beforeShowForm:null,beforeInitData:null,viewPagerButtons:true},
|
276
|
+
a.jgrid.view,b||{});return this.each(function(){function c(){if(b.closeOnEscape===true||b.navkeys[0]===true)setTimeout(function(){a(".ui-jqdialog-titlebar-close","#"+o.modalhead).focus()},0)}function n(g,A,L,j){for(var J,S,P,Q=0,R,W,X=[],$=false,ca="<td class='CaptionTD form-view-label ui-widget-content' width='"+b.labelswidth+"'> </td><td class='DataTD form-view-data ui-helper-reset ui-widget-content'> </td>",ba="",ea=["integer","number","currency"],f=0,h=0,x,r,H,C=1;C<=j;C++)ba+=C==1?
|
277
|
+
ca:"<td class='CaptionTD form-view-label ui-widget-content'> </td><td class='DataTD form-view-data ui-widget-content'> </td>";a(A.p.colModel).each(function(){S=this.editrules&&this.editrules.edithidden===true?false:this.hidden===true?true:false;if(!S&&this.align==="right")if(this.formatter&&a.inArray(this.formatter,ea)!==-1)f=Math.max(f,parseInt(this.width,10));else h=Math.max(h,parseInt(this.width,10))});x=f!==0?f:h!==0?h:0;$=a(A).jqGrid("getInd",g);a(A.p.colModel).each(function(z){J=this.name;
|
278
|
+
r=false;W=(S=this.editrules&&this.editrules.edithidden===true?false:this.hidden===true?true:false)?"style='display:none'":"";H=typeof this.viewable!="boolean"?true:this.viewable;if(J!=="cb"&&J!=="subgrid"&&J!=="rn"&&H){R=$===false?"":J==A.p.ExpandColumn&&A.p.treeGrid===true?a("td:eq("+z+")",A.rows[$]).text():a("td:eq("+z+")",A.rows[$]).html();r=this.align==="right"&&x!==0?true:false;a.extend({},this.editoptions||{},{id:J,name:J});var I=a.extend({},{rowabove:false,rowcontent:""},this.formoptions||
|
279
|
+
{}),y=parseInt(I.rowpos,10)||Q+1,N=parseInt((parseInt(I.colpos,10)||1)*2,10);if(I.rowabove){var G=a("<tr><td class='contentinfo' colspan='"+j*2+"'>"+I.rowcontent+"</td></tr>");a(L).append(G);G[0].rp=y}P=a(L).find("tr[rowpos="+y+"]");if(P.length===0){P=a("<tr "+W+" rowpos='"+y+"'></tr>").addClass("FormData").attr("id","trv_"+J);a(P).append(ba);a(L).append(P);P[0].rp=y}a("td:eq("+(N-2)+")",P[0]).html("<b>"+(typeof I.label==="undefined"?A.p.colNames[z]:I.label)+"</b>");a("td:eq("+(N-1)+")",P[0]).append("<span>"+
|
280
|
+
R+"</span>").attr("id","v_"+J);r&&a("td:eq("+(N-1)+") span",P[0]).css({"text-align":"right",width:x+"px"});X[Q]=z;Q++}});if(Q>0){g=a("<tr class='FormData' style='display:none'><td class='CaptionTD'></td><td colspan='"+(j*2-1)+"' class='DataTD'><input class='FormElement' id='id_g' type='text' name='id' value='"+g+"'/></td></tr>");g[0].rp=Q+99;a(L).append(g)}return X}function E(g,A){var L,j,J=0,S,P;if(P=a(A).jqGrid("getInd",g,true)){a("td",P).each(function(Q){L=A.p.colModel[Q].name;j=A.p.colModel[Q].editrules&&
|
281
|
+
A.p.colModel[Q].editrules.edithidden===true?false:A.p.colModel[Q].hidden===true?true:false;if(L!=="cb"&&L!=="subgrid"&&L!=="rn"){S=L==A.p.ExpandColumn&&A.p.treeGrid===true?a(this).text():a(this).html();a.extend({},A.p.colModel[Q].editoptions||{});L=a.jgrid.jqID("v_"+L);a("#"+L+" span","#"+p).html(S);j&&a("#"+L,"#"+p).parents("tr:first").hide();J++}});J>0&&a("#id_g","#"+p).val(g)}}function D(g,A){g===0?a("#pData","#"+p+"_2").addClass("ui-state-disabled"):a("#pData","#"+p+"_2").removeClass("ui-state-disabled");
|
282
|
+
g==A?a("#nData","#"+p+"_2").addClass("ui-state-disabled"):a("#nData","#"+p+"_2").removeClass("ui-state-disabled")}function F(){var g=a(s).jqGrid("getDataIDs"),A=a("#id_g","#"+p).val();return[a.inArray(A,g),g]}var s=this;if(s.grid&&d){if(!b.imgpath)b.imgpath=s.p.imgpath;var q=s.p.id,u="ViewGrid_"+q,p="ViewTbl_"+q,o={themodal:"viewmod"+q,modalhead:"viewhd"+q,modalcontent:"viewcnt"+q,scrollelm:u},t=a.isFunction(b.beforeInitData)?b.beforeInitData:false,e=true,w=1,l=0;if(a("#"+o.themodal).html()!==null){if(t){e=
|
283
|
+
t(a("#"+u));if(typeof e=="undefined")e=true}if(e===false)return;a(".ui-jqdialog-title","#"+o.modalhead).html(b.caption);a("#FormError","#"+p).hide();E(d,s);a.isFunction(b.beforeShowForm)&&b.beforeShowForm(a("#"+u));a.jgrid.viewModal("#"+o.themodal,{gbox:"#gbox_"+q,jqm:b.jqModal,jqM:false,overlay:b.overlay,modal:b.modal});c()}else{var k=isNaN(b.dataheight)?b.dataheight:b.dataheight+"px";k=a("<form name='FormPost' id='"+u+"' class='FormGrid' style='width:100%;overflow:auto;position:relative;height:"+
|
284
|
+
k+";'></form>");var m=a("<table id='"+p+"' class='EditTable' cellspacing='1' cellpadding='2' border='0' style='table-layout:fixed'><tbody></tbody></table>");if(t){e=t(a("#"+u));if(typeof e=="undefined")e=true}if(e===false)return;a(s.p.colModel).each(function(){var g=this.formoptions;w=Math.max(w,g?g.colpos||0:0);l=Math.max(l,g?g.rowpos||0:0)});a(k).append(m);n(d,s,m,w);t=s.p.direction=="rtl"?true:false;e="<a href='javascript:void(0)' id='"+(t?"nData":"pData")+"' class='fm-button ui-state-default ui-corner-left'><span class='ui-icon ui-icon-triangle-1-w'></span></a>";
|
285
|
+
var v="<a href='javascript:void(0)' id='"+(t?"pData":"nData")+"' class='fm-button ui-state-default ui-corner-right'><span class='ui-icon ui-icon-triangle-1-e'></span></a>",M="<a href='javascript:void(0)' id='cData' class='fm-button ui-state-default ui-corner-all'>"+b.bClose+"</a>";if(l>0){var B=[];a.each(a(m)[0].rows,function(g,A){B[g]=A});B.sort(function(g,A){if(g.rp>A.rp)return 1;if(g.rp<A.rp)return-1;return 0});a.each(B,function(g,A){a("tbody",m).append(A)})}b.gbox="#gbox_"+q;var U=false;if(b.closeOnEscape===
|
286
|
+
true){b.closeOnEscape=false;U=true}k=a("<span></span>").append(k).append("<table border='0' class='EditTable' id='"+p+"_2'><tbody><tr id='Act_Buttons'><td class='navButton' width='"+b.labelswidth+"'>"+(t?v+e:e+v)+"</td><td class='EditButton'>"+M+"</td></tr></tbody></table>");a.jgrid.createModal(o,k,b,"#gview_"+s.p.id,a("#gview_"+s.p.id)[0]);if(t){a("#pData, #nData","#"+p+"_2").css("float","right");a(".EditButton","#"+p+"_2").css("text-align","left")}b.viewPagerButtons||a("#pData, #nData","#"+p+"_2").hide();
|
287
|
+
k=null;a("#"+o.themodal).keydown(function(g){if(g.which===27){U&&a.jgrid.hideModal(this,{gb:b.gbox,jqm:b.jqModal,onClose:b.onClose});return false}if(b.navkeys[0]===true){if(g.which===b.navkeys[1]){a("#pData","#"+p+"_2").trigger("click");return false}if(g.which===b.navkeys[2]){a("#nData","#"+p+"_2").trigger("click");return false}}});b.closeicon=a.extend([true,"left","ui-icon-close"],b.closeicon);if(b.closeicon[0]===true)a("#cData","#"+p+"_2").addClass(b.closeicon[1]=="right"?"fm-button-icon-right":
|
288
|
+
"fm-button-icon-left").append("<span class='ui-icon "+b.closeicon[2]+"'></span>");a.isFunction(b.beforeShowForm)&&b.beforeShowForm(a("#"+u));a.jgrid.viewModal("#"+o.themodal,{gbox:"#gbox_"+q,jqm:b.jqModal,modal:b.modal});a(".fm-button:not(.ui-state-disabled)","#"+p+"_2").hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});c();a("#cData","#"+p+"_2").click(function(){a.jgrid.hideModal("#"+o.themodal,{gb:"#gbox_"+q,jqm:b.jqModal,onClose:b.onClose});
|
289
|
+
return false});a("#nData","#"+p+"_2").click(function(){a("#FormError","#"+p).hide();var g=F();g[0]=parseInt(g[0],10);if(g[0]!=-1&&g[1][g[0]+1]){if(a.isFunction(b.onclickPgButtons))b.onclickPgButtons("next",a("#"+u),g[1][g[0]]);E(g[1][g[0]+1],s);a(s).jqGrid("setSelection",g[1][g[0]+1]);a.isFunction(b.afterclickPgButtons)&&b.afterclickPgButtons("next",a("#"+u),g[1][g[0]+1]);D(g[0]+1,g[1].length-1)}c();return false});a("#pData","#"+p+"_2").click(function(){a("#FormError","#"+p).hide();var g=F();if(g[0]!=
|
290
|
+
-1&&g[1][g[0]-1]){if(a.isFunction(b.onclickPgButtons))b.onclickPgButtons("prev",a("#"+u),g[1][g[0]]);E(g[1][g[0]-1],s);a(s).jqGrid("setSelection",g[1][g[0]-1]);a.isFunction(b.afterclickPgButtons)&&b.afterclickPgButtons("prev",a("#"+u),g[1][g[0]-1]);D(g[0]-1,g[1].length-1)}c();return false})}k=F();D(k[0],k[1].length-1)}})},delGridRow:function(d,b){var c=b=a.extend({top:0,left:0,width:240,height:"auto",dataheight:"auto",modal:false,overlay:10,drag:true,resize:true,url:"",mtype:"POST",reloadAfterSubmit:true,
|
291
|
+
beforeShowForm:null,beforeInitData:null,afterShowForm:null,beforeSubmit:null,onclickSubmit:null,afterSubmit:null,jqModal:true,closeOnEscape:false,delData:{},delicon:[],cancelicon:[],onClose:null,ajaxDelOptions:{},processing:false,serializeDelData:null,useDataProxy:false},a.jgrid.del,b||{});return this.each(function(){var n=this;if(n.grid)if(d){var E=a.isFunction(b.beforeShowForm),D=a.isFunction(b.afterShowForm),F=a.isFunction(b.beforeInitData)?b.beforeInitData:false,s=n.p.id,q={},u=true,p="DelTbl_"+
|
292
|
+
s,o,t,e,w,l={themodal:"delmod"+s,modalhead:"delhd"+s,modalcontent:"delcnt"+s,scrollelm:p};if(jQuery.isArray(d))d=d.join();if(a("#"+l.themodal).html()!==null){if(F){u=F(a("#"+p));if(typeof u=="undefined")u=true}if(u===false)return;a("#DelData>td","#"+p).text(d);a("#DelError","#"+p).hide();if(c.processing===true){c.processing=false;a("#dData","#"+p).removeClass("ui-state-active")}E&&b.beforeShowForm(a("#"+p));a.jgrid.viewModal("#"+l.themodal,{gbox:"#gbox_"+s,jqm:b.jqModal,jqM:false,overlay:b.overlay,
|
293
|
+
modal:b.modal})}else{var k=isNaN(b.dataheight)?b.dataheight:b.dataheight+"px";k="<div id='"+p+"' class='formdata' style='width:100%;overflow:auto;position:relative;height:"+k+";'>";k+="<table class='DelTable'><tbody>";k+="<tr id='DelError' style='display:none'><td class='ui-state-error'></td></tr>";k+="<tr id='DelData' style='display:none'><td >"+d+"</td></tr>";k+='<tr><td class="delmsg" style="white-space:pre;">'+b.msg+"</td></tr><tr><td > </td></tr>";k+="</tbody></table></div>";k+="<table cellspacing='0' cellpadding='0' border='0' class='EditTable' id='"+
|
294
|
+
p+"_2'><tbody><tr><td><hr class='ui-widget-content' style='margin:1px'/></td></tr></tr><tr><td class='DelButton EditButton'>"+("<a href='javascript:void(0)' id='dData' class='fm-button ui-state-default ui-corner-all'>"+b.bSubmit+"</a>")+" "+("<a href='javascript:void(0)' id='eData' class='fm-button ui-state-default ui-corner-all'>"+b.bCancel+"</a>")+"</td></tr></tbody></table>";b.gbox="#gbox_"+s;a.jgrid.createModal(l,k,b,"#gview_"+n.p.id,a("#gview_"+n.p.id)[0]);if(F){u=F(a("#"+p));if(typeof u==
|
295
|
+
"undefined")u=true}if(u===false)return;a(".fm-button","#"+p+"_2").hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});b.delicon=a.extend([true,"left","ui-icon-scissors"],b.delicon);b.cancelicon=a.extend([true,"left","ui-icon-cancel"],b.cancelicon);if(b.delicon[0]===true)a("#dData","#"+p+"_2").addClass(b.delicon[1]=="right"?"fm-button-icon-right":"fm-button-icon-left").append("<span class='ui-icon "+b.delicon[2]+"'></span>");if(b.cancelicon[0]===
|
296
|
+
true)a("#eData","#"+p+"_2").addClass(b.cancelicon[1]=="right"?"fm-button-icon-right":"fm-button-icon-left").append("<span class='ui-icon "+b.cancelicon[2]+"'></span>");a("#dData","#"+p+"_2").click(function(){var m=[true,""];q={};var v=a("#DelData>td","#"+p).text();if(a.isFunction(b.onclickSubmit))q=b.onclickSubmit(c,v)||{};if(a.isFunction(b.beforeSubmit))m=b.beforeSubmit(v);if(m[0]&&!c.processing){c.processing=true;a(this).addClass("ui-state-active");e=n.p.prmNames;o=a.extend({},c.delData,q);w=e.oper;
|
297
|
+
o[w]=e.deloper;t=e.id;o[t]=v;var M=a.extend({url:c.url?c.url:a(n).jqGrid("getGridParam","editurl"),type:b.mtype,data:a.isFunction(b.serializeDelData)?b.serializeDelData(o):o,complete:function(B,U){if(U!="success"){m[0]=false;m[1]=a.isFunction(c.errorTextFormat)?c.errorTextFormat(B):U+" Status: '"+B.statusText+"'. Error code: "+B.status}else if(a.isFunction(c.afterSubmit))m=c.afterSubmit(B,o);if(m[0]===false){a("#DelError>td","#"+p).html(m[1]);a("#DelError","#"+p).show()}else{if(c.reloadAfterSubmit&&
|
298
|
+
n.p.datatype!="local")a(n).trigger("reloadGrid");else{var g=[];g=v.split(",");if(n.p.treeGrid===true)try{a(n).jqGrid("delTreeNode",g[0])}catch(A){}else for(var L=0;L<g.length;L++)a(n).jqGrid("delRowData",g[L]);n.p.selrow=null;n.p.selarrrow=[]}a.isFunction(c.afterComplete)&&setTimeout(function(){c.afterComplete(B,v)},500)}c.processing=false;a("#dData","#"+p+"_2").removeClass("ui-state-active");m[0]&&a.jgrid.hideModal("#"+l.themodal,{gb:"#gbox_"+s,jqm:b.jqModal,onClose:c.onClose})}},a.jgrid.ajaxOptions,
|
299
|
+
b.ajaxDelOptions);if(!M.url&&!c.useDataProxy)if(a.isFunction(n.p.dataProxy))c.useDataProxy=true;else{m[0]=false;m[1]+=" "+a.jgrid.errors.nourl}if(m[0])c.useDataProxy?n.p.dataProxy.call(n,M,"del_"+n.p.id):a.ajax(M)}if(m[0]===false){a("#DelError>td","#"+p).html(m[1]);a("#DelError","#"+p).show()}return false});a("#eData","#"+p+"_2").click(function(){a.jgrid.hideModal("#"+l.themodal,{gb:"#gbox_"+s,jqm:b.jqModal,onClose:c.onClose});return false});E&&b.beforeShowForm(a("#"+p));a.jgrid.viewModal("#"+l.themodal,
|
300
|
+
{gbox:"#gbox_"+s,jqm:b.jqModal,overlay:b.overlay,modal:b.modal})}D&&b.afterShowForm(a("#"+p));b.closeOnEscape===true&&setTimeout(function(){a(".ui-jqdialog-titlebar-close","#"+l.modalhead).focus()},0)}})},navGrid:function(d,b,c,n,E,D,F){b=a.extend({edit:true,editicon:"ui-icon-pencil",add:true,addicon:"ui-icon-plus",del:true,delicon:"ui-icon-trash",search:true,searchicon:"ui-icon-search",refresh:true,refreshicon:"ui-icon-refresh",refreshstate:"firstpage",view:false,viewicon:"ui-icon-document",position:"left",
|
301
|
+
closeOnEscape:true,beforeRefresh:null,afterRefresh:null,cloneToTop:false},a.jgrid.nav,b||{});return this.each(function(){if(!this.nav){var s={themodal:"alertmod",modalhead:"alerthd",modalcontent:"alertcnt"},q=this,u,p,o;if(!(!q.grid||typeof d!="string")){if(a("#"+s.themodal).html()===null){if(typeof window.innerWidth!="undefined"){u=window.innerWidth;p=window.innerHeight}else if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!==
|
302
|
+
0){u=document.documentElement.clientWidth;p=document.documentElement.clientHeight}else{u=1024;p=768}a.jgrid.createModal(s,"<div>"+b.alerttext+"</div><span tabindex='0'><span tabindex='-1' id='jqg_alrt'></span></span>",{gbox:"#gbox_"+q.p.id,jqModal:true,drag:true,resize:true,caption:b.alertcap,top:p/2-25,left:u/2-100,width:200,height:"auto",closeOnEscape:b.closeOnEscape},"","",true)}u=1;if(b.cloneToTop&&q.p.toppager)u=2;for(p=0;p<u;p++){var t=a("<table cellspacing='0' cellpadding='0' border='0' class='ui-pg-table navtable' style='float:left;table-layout:auto;'><tbody><tr></tr></tbody></table>"),
|
303
|
+
e,w;if(p===0){e=d;w=q.p.id;if(e==q.p.toppager){w+="_top";u=1}}else{e=q.p.toppager;w=q.p.id+"_top"}q.p.direction=="rtl"&&a(t).attr("dir","rtl").css("float","right");if(b.add){n=n||{};o=a("<td class='ui-pg-button ui-corner-all'></td>");a(o).append("<div class='ui-pg-div'><span class='ui-icon "+b.addicon+"'></span>"+b.addtext+"</div>");a("tr",t).append(o);a(o,t).attr({title:b.addtitle||"",id:n.id||"add_"+w}).click(function(){a(this).hasClass("ui-state-disabled")||(a.isFunction(b.addfunc)?b.addfunc():
|
304
|
+
a(q).jqGrid("editGridRow","new",n));return false}).hover(function(){a(this).hasClass("ui-state-disabled")||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});o=null}if(b.edit){o=a("<td class='ui-pg-button ui-corner-all'></td>");c=c||{};a(o).append("<div class='ui-pg-div'><span class='ui-icon "+b.editicon+"'></span>"+b.edittext+"</div>");a("tr",t).append(o);a(o,t).attr({title:b.edittitle||"",id:c.id||"edit_"+w}).click(function(){if(!a(this).hasClass("ui-state-disabled")){var l=
|
305
|
+
q.p.selrow;if(l)a.isFunction(b.editfunc)?b.editfunc(l):a(q).jqGrid("editGridRow",l,c);else{a.jgrid.viewModal("#"+s.themodal,{gbox:"#gbox_"+q.p.id,jqm:true});a("#jqg_alrt").focus()}}return false}).hover(function(){a(this).hasClass("ui-state-disabled")||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});o=null}if(b.view){o=a("<td class='ui-pg-button ui-corner-all'></td>");F=F||{};a(o).append("<div class='ui-pg-div'><span class='ui-icon "+b.viewicon+"'></span>"+b.viewtext+
|
306
|
+
"</div>");a("tr",t).append(o);a(o,t).attr({title:b.viewtitle||"",id:F.id||"view_"+w}).click(function(){if(!a(this).hasClass("ui-state-disabled")){var l=q.p.selrow;if(l)a.isFunction(b.viewfunc)?b.viewfunc(l):a(q).jqGrid("viewGridRow",l,F);else{a.jgrid.viewModal("#"+s.themodal,{gbox:"#gbox_"+q.p.id,jqm:true});a("#jqg_alrt").focus()}}return false}).hover(function(){a(this).hasClass("ui-state-disabled")||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});o=null}if(b.del){o=
|
307
|
+
a("<td class='ui-pg-button ui-corner-all'></td>");E=E||{};a(o).append("<div class='ui-pg-div'><span class='ui-icon "+b.delicon+"'></span>"+b.deltext+"</div>");a("tr",t).append(o);a(o,t).attr({title:b.deltitle||"",id:E.id||"del_"+w}).click(function(){if(!a(this).hasClass("ui-state-disabled")){var l;if(q.p.multiselect){l=q.p.selarrrow;if(l.length===0)l=null}else l=q.p.selrow;if(l)"function"==typeof b.delfunc?b.delfunc(l):a(q).jqGrid("delGridRow",l,E);else{a.jgrid.viewModal("#"+s.themodal,{gbox:"#gbox_"+
|
308
|
+
q.p.id,jqm:true});a("#jqg_alrt").focus()}}return false}).hover(function(){a(this).hasClass("ui-state-disabled")||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});o=null}if(b.add||b.edit||b.del||b.view)a("tr",t).append("<td class='ui-pg-button ui-state-disabled' style='width:4px;'><span class='ui-separator'></span></td>");if(b.search){o=a("<td class='ui-pg-button ui-corner-all'></td>");D=D||{};a(o).append("<div class='ui-pg-div'><span class='ui-icon "+b.searchicon+
|
309
|
+
"'></span>"+b.searchtext+"</div>");a("tr",t).append(o);a(o,t).attr({title:b.searchtitle||"",id:D.id||"search_"+w}).click(function(){a(this).hasClass("ui-state-disabled")||a(q).jqGrid("searchGrid",D);return false}).hover(function(){a(this).hasClass("ui-state-disabled")||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});D.showOnLoad&&D.showOnLoad===true&&a(o,t).click();o=null}if(b.refresh){o=a("<td class='ui-pg-button ui-corner-all'></td>");a(o).append("<div class='ui-pg-div'><span class='ui-icon "+
|
310
|
+
b.refreshicon+"'></span>"+b.refreshtext+"</div>");a("tr",t).append(o);a(o,t).attr({title:b.refreshtitle||"",id:"refresh_"+w}).click(function(){if(!a(this).hasClass("ui-state-disabled")){a.isFunction(b.beforeRefresh)&&b.beforeRefresh();q.p.search=false;try{var l=q.p.id;q.p.postData.filters="";a("#fbox_"+l).jqFilter("resetFilter");a.isFunction(q.clearToolbar)&&q.clearToolbar(false)}catch(k){}switch(b.refreshstate){case "firstpage":a(q).trigger("reloadGrid",[{page:1}]);break;case "current":a(q).trigger("reloadGrid",
|
311
|
+
[{current:true}])}a.isFunction(b.afterRefresh)&&b.afterRefresh()}return false}).hover(function(){a(this).hasClass("ui-state-disabled")||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});o=null}o=a(".ui-jqgrid").css("font-size")||"11px";a("body").append("<div id='testpg2' class='ui-jqgrid ui-widget ui-widget-content' style='font-size:"+o+";visibility:hidden;' ></div>");o=a(t).clone().appendTo("#testpg2").width();a("#testpg2").remove();a(e+"_"+b.position,e).append(t);
|
312
|
+
if(q.p._nvtd){if(o>q.p._nvtd[0]){a(e+"_"+b.position,e).width(o);q.p._nvtd[0]=o}q.p._nvtd[1]=o}t=o=o=null;this.nav=true}}}})},navButtonAdd:function(d,b){b=a.extend({caption:"newButton",title:"",buttonicon:"ui-icon-newwin",onClickButton:null,position:"last",cursor:"pointer"},b||{});return this.each(function(){if(this.grid){if(d.indexOf("#")!==0)d="#"+d;var c=a(".navtable",d)[0],n=this;if(c)if(!(b.id&&a("#"+b.id,c).html()!==null)){var E=a("<td></td>");b.buttonicon.toString().toUpperCase()=="NONE"?a(E).addClass("ui-pg-button ui-corner-all").append("<div class='ui-pg-div'>"+
|
313
|
+
b.caption+"</div>"):a(E).addClass("ui-pg-button ui-corner-all").append("<div class='ui-pg-div'><span class='ui-icon "+b.buttonicon+"'></span>"+b.caption+"</div>");b.id&&a(E).attr("id",b.id);if(b.position=="first")c.rows[0].cells.length===0?a("tr",c).append(E):a("tr td:eq(0)",c).before(E);else a("tr",c).append(E);a(E,c).attr("title",b.title||"").click(function(D){a(this).hasClass("ui-state-disabled")||a.isFunction(b.onClickButton)&&b.onClickButton.call(n,D);return false}).hover(function(){a(this).hasClass("ui-state-disabled")||
|
314
|
+
a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")})}}})},navSeparatorAdd:function(d,b){b=a.extend({sepclass:"ui-separator",sepcontent:""},b||{});return this.each(function(){if(this.grid){if(d.indexOf("#")!==0)d="#"+d;var c=a(".navtable",d)[0];if(c){var n="<td class='ui-pg-button ui-state-disabled' style='width:4px;'><span class='"+b.sepclass+"'></span>"+b.sepcontent+"</td>";a("tr",c).append(n)}}})},GridToForm:function(d,b){return this.each(function(){if(this.grid){var c=
|
315
|
+
a(this).jqGrid("getRowData",d);if(c)for(var n in c)a("[name="+a.jgrid.jqID(n)+"]",b).is("input:radio")||a("[name="+a.jgrid.jqID(n)+"]",b).is("input:checkbox")?a("[name="+a.jgrid.jqID(n)+"]",b).each(function(){a(this).val()==c[n]?a(this).attr("checked","checked"):a(this).attr("checked","")}):a("[name="+a.jgrid.jqID(n)+"]",b).val(c[n])}})},FormToGrid:function(d,b,c,n){return this.each(function(){if(this.grid){c||(c="set");n||(n="first");var E=a(b).serializeArray(),D={};a.each(E,function(F,s){D[s.name]=
|
316
|
+
s.value});if(c=="add")a(this).jqGrid("addRowData",d,D,n);else c=="set"&&a(this).jqGrid("setRowData",d,D)}})}})})(jQuery);
|
317
|
+
(function(c){c.fn.jqFilter=function(k){if(typeof k==="string"){var w=c.fn.jqFilter[k];if(!w)throw"jqFilter - No such method: "+k;var B=c.makeArray(arguments).slice(1);return w.apply(this,B)}var o=c.extend(true,{filter:null,columns:[],onChange:null,afterRedraw:null,checkValues:null,error:false,errmsg:"",errorcheck:true,showQuery:true,sopt:null,ops:[{name:"eq",description:"equal",operator:"="},{name:"ne",description:"not equal",operator:"<>"},{name:"lt",description:"less",operator:"<"},{name:"le",description:"less or equal",
|
318
|
+
operator:"<="},{name:"gt",description:"greater",operator:">"},{name:"ge",description:"greater or equal",operator:">="},{name:"bw",description:"begins with",operator:"LIKE"},{name:"bn",description:"does not begin with",operator:"NOT LIKE"},{name:"in",description:"in",operator:"IN"},{name:"ni",description:"not in",operator:"NOT IN"},{name:"ew",description:"ends with",operator:"LIKE"},{name:"en",description:"does not end with",operator:"NOT LIKE"},{name:"cn",description:"contains",operator:"LIKE"},{name:"nc",
|
319
|
+
description:"does not contain",operator:"NOT LIKE"},{name:"nu",description:"is null",operator:"IS NULL"},{name:"nn",description:"is not null",operator:"IS NOT NULL"}],numopts:["eq","ne","lt","le","gt","ge","nu","nn","in","ni"],stropts:["eq","ne","bw","bn","ew","en","cn","nc","nu","nn","in","ni"],_gridsopt:[],groupOps:["AND","OR"],groupButton:true,ruleButtons:true},k||{});return this.each(function(){if(!this.filter){this.p=o;if(this.p.filter===null||this.p.filter===undefined)this.p.filter={groupOp:this.p.groupOps[0],
|
320
|
+
rules:[],groups:[]};var q,x=this.p.columns.length,i,y=/msie/i.test(navigator.userAgent)&&!window.opera;if(this.p._gridsopt.length)for(q=0;q<this.p._gridsopt.length;q++)this.p.ops[q].description=this.p._gridsopt[q];this.p.initFilter=c.extend(true,{},this.p.filter);if(x){for(q=0;q<x;q++){i=this.p.columns[q];if(i.stype)i.inputtype=i.stype;else if(!i.inputtype)i.inputtype="text";if(i.sorttype)i.searchtype=i.sorttype;else if(!i.searchtype)i.searchtype="string";if(i.hidden===undefined)i.hidden=false;if(!i.label)i.label=
|
321
|
+
i.name;if(i.index)i.name=i.index;if(!i.hasOwnProperty("searchoptions"))i.searchoptions={};if(!i.hasOwnProperty("searchrules"))i.searchrules={}}this.p.showQuery&&c(this).append("<table class='queryresult ui-widget ui-widget-content' style='display:block;max-width:440px;border:0px none;'><tbody><tr><td class='query'></td></tr></tbody></table>");var z=function(d,f){var a=[true,""];if(c.isFunction(f.searchrules))a=f.searchrules(d,f);else if(c.jgrid&&c.jgrid.checkValues)try{a=c.jgrid.checkValues(d,-1,
|
322
|
+
null,f.searchrules,f.label)}catch(b){}if(a&&a.length&&a[0]===false){o.error=!a[0];o.errmsg=a[1]}};this.onchange=function(){this.p.error=false;this.p.errmsg="";return c.isFunction(this.p.onChange)?this.p.onChange.call(this,this.p):false};this.reDraw=function(){c("table.group:first",this).remove();var d=this.createTableForGroup(o.filter,null);c(this).append(d);c.isFunction(this.p.afterRedraw)&&this.p.afterRedraw.call(this,this.p)};this.createTableForGroup=function(d,f){var a=this,b,e=c("<table class='group ui-widget ui-widget-content' style='border:0px none;'><tbody></tbody></table>");
|
323
|
+
f===null&&c(e).append("<tr class='error' style='display:none;'><th colspan='5' class='ui-state-error' align='left'></th></tr>");var g=c("<tr></tr>");c(e).append(g);var j=c("<th colspan='5' align='left'></th>");g.append(j);if(this.p.ruleButtons===true){var h=c("<select class='opsel'></select>");j.append(h);g="";var l;for(b=0;b<o.groupOps.length;b++){l=d.groupOp===a.p.groupOps[b]?" selected='selected'":"";g+="<option value='"+a.p.groupOps[b]+"'"+l+">"+a.p.groupOps[b]+"</option>"}h.append(g).bind("change",
|
324
|
+
function(){d.groupOp=c(h).val();a.onchange()})}g="<span></span>";if(this.p.groupButton){g=c("<input type='button' value='+ {}' title='Add subgroup' class='add-group'/>");g.bind("click",function(){if(d.groups===undefined)d.groups=[];d.groups.push({groupOp:o.groupOps[0],rules:[],groups:[]});a.reDraw();a.onchange();return false})}j.append(g);if(this.p.ruleButtons===true){g=c("<input type='button' value='+' title='Add rule' class='add-rule ui-add'/>");var m;g.bind("click",function(){if(d.rules===undefined)d.rules=
|
325
|
+
[];for(b=0;b<a.p.columns.length;b++){var n=typeof a.p.columns[b].search==="undefined"?true:a.p.columns[b].search,s=a.p.columns[b].hidden===true;if(a.p.columns[b].searchoptions.searchhidden===true&&n||n&&!s){m=a.p.columns[b];break}}d.rules.push({field:m.name,op:(m.searchoptions.sopt?m.searchoptions.sopt:a.p.sopt?a.p.sopt:m.searchtype==="string"?a.p.stropts:a.p.numopts)[0],data:""});a.reDraw();return false});j.append(g)}if(f!==null){g=c("<input type='button' value='-' title='Delete group' class='delete-group'/>");
|
326
|
+
j.append(g);g.bind("click",function(){for(b=0;b<f.groups.length;b++)if(f.groups[b]===d){f.groups.splice(b,1);break}a.reDraw();a.onchange();return false})}if(d.groups!==undefined)for(b=0;b<d.groups.length;b++){j=c("<tr></tr>");e.append(j);g=c("<td class='first'></td>");j.append(g);g=c("<td colspan='4'></td>");g.append(this.createTableForGroup(d.groups[b],d));j.append(g)}if(d.groupOp===undefined)d.groupOp=a.p.groupOps[0];if(d.rules!==undefined)for(b=0;b<d.rules.length;b++)e.append(this.createTableRowForRule(d.rules[b],
|
327
|
+
d));return e};this.createTableRowForRule=function(d,f){var a=this,b=c("<tr></tr>"),e,g,j,h,l="",m;b.append("<td class='first'></td>");var n=c("<td class='columns'></td>");b.append(n);var s=c("<select></select>"),p,t=[];n.append(s);s.bind("change",function(){d.field=c(s).val();j=c(this).parents("tr:first");for(e=0;e<a.p.columns.length;e++)if(a.p.columns[e].name===d.field){h=a.p.columns[e];break}if(h){h.searchoptions.id=c.jgrid.randId();if(y&&h.inputtype==="text")if(!h.searchoptions.size)h.searchoptions.size=
|
328
|
+
10;var r=c.jgrid.createEl(h.inputtype,h.searchoptions,"",true,a.p.ajaxSelectOptions,true);c(r).addClass("input-elm");g=h.searchoptions.sopt?h.searchoptions.sopt:a.p.sopt?a.p.sopt:h.searchtype==="string"?a.p.stropts:a.p.numopts;var A="",v="";t=[];c.each(a.p.ops,function(){t.push(this.name)});for(e=0;e<g.length;e++){p=c.inArray(g[e],t);if(p!==-1){v="";if(e===0){d.op=a.p.ops[p].name;v=" selected='selected'"}A+="<option value='"+a.p.ops[p].name+"'"+v+">"+a.p.ops[p].description+"</option>"}}c(".selectopts",
|
329
|
+
j).empty().append(A);c(".data",j).empty().append(r);c(".input-elm",j).bind("change",function(){d.data=c(this).val();a.onchange()});setTimeout(function(){d.data=c(r).val();a.onchange()},0)}});for(e=n=0;e<a.p.columns.length;e++){m=typeof a.p.columns[e].search==="undefined"?true:a.p.columns[e].search;var C=a.p.columns[e].hidden===true;if(a.p.columns[e].searchoptions.searchhidden===true&&m||m&&!C){m="";if(d.field===a.p.columns[e].name){m=" selected='selected'";n=e}l+="<option value='"+a.p.columns[e].name+
|
330
|
+
"'"+m+">"+a.p.columns[e].label+"</option>"}}s.append(l);l=c("<td class='operators'></td>");b.append(l);h=o.columns[n];h.searchoptions.id=c.jgrid.randId();if(y&&h.inputtype==="text")if(!h.searchoptions.size)h.searchoptions.size=10;n=c.jgrid.createEl(h.inputtype,h.searchoptions,d.data,true,a.p.ajaxSelectOptions,true);var u=c("<select class='selectopts'></select>");l.append(u);u.bind("change",function(){d.op=c(u).val();j=c(this).parents("tr:first");var r=c(".input-elm",j)[0];if(d.op==="nu"||d.op==="nn"){d.data=
|
331
|
+
"";r.value="";r.setAttribute("readonly","true");r.setAttribute("disabled","true")}else{r.removeAttribute("readonly");r.removeAttribute("disabled")}a.onchange()});g=h.searchoptions.sopt?h.searchoptions.sopt:a.p.sopt?a.p.sopt:h.searchtype==="string"?o.stropts:a.p.numopts;l="";c.each(a.p.ops,function(){t.push(this.name)});for(e=0;e<g.length;e++){p=c.inArray(g[e],t);if(p!==-1){m=d.op===a.p.ops[p].name?" selected='selected'":"";l+="<option value='"+a.p.ops[p].name+"'"+m+">"+a.p.ops[p].description+"</option>"}}u.append(l);
|
332
|
+
l=c("<td class='data'></td>");b.append(l);l.append(n);c(n).addClass("input-elm").bind("change",function(){d.data=c(this).val();a.onchange()});l=c("<td></td>");b.append(l);if(this.p.ruleButtons===true){n=c("<input type='button' value='-' title='Delete rule' class='delete-rule ui-del'/>");l.append(n);n.bind("click",function(){for(e=0;e<f.rules.length;e++)if(f.rules[e]===d){f.rules.splice(e,1);break}a.reDraw();a.onchange();return false})}return b};this.getStringForGroup=function(d){var f="(",a;if(d.groups!==
|
333
|
+
undefined)for(a=0;a<d.groups.length;a++){if(f.length>1)f+=" "+d.groupOp+" ";try{f+=this.getStringForGroup(d.groups[a])}catch(b){alert(b)}}if(d.rules!==undefined)try{for(a=0;a<d.rules.length;a++){if(f.length>1)f+=" "+d.groupOp+" ";f+=this.getStringForRule(d.rules[a])}}catch(e){alert(e)}f+=")";return f==="()"?"":f};this.getStringForRule=function(d){var f="",a="",b,e;for(b=0;b<this.p.ops.length;b++)if(this.p.ops[b].name===d.op){f=this.p.ops[b].operator;a=this.p.ops[b].name;break}for(b=0;b<this.p.columns.length;b++)if(this.p.columns[b].name===
|
334
|
+
d.field){e=this.p.columns[b];break}b=d.data;if(a==="bw"||a==="bn")b+="%";if(a==="ew"||a==="en")b="%"+b;if(a==="cn"||a==="nc")b="%"+b+"%";if(a==="in"||a==="ni")b=" ("+b+")";o.errorcheck&&z(d.data,e);return c.inArray(e.searchtype,["int","integer","float","number","currency"])!==-1||a==="nn"||a==="nu"?d.field+" "+f+" "+b:d.field+" "+f+' "'+b+'"'};this.resetFilter=function(){this.p.filter=c.extend(true,{},this.p.initFilter);this.reDraw();this.onchange()};this.hideError=function(){c("th.ui-state-error",
|
335
|
+
this).html("");c("tr.error",this).hide()};this.showError=function(){c("th.ui-state-error",this).html(this.p.errmsg);c("tr.error",this).show()};this.toUserFriendlyString=function(){return this.getStringForGroup(o.filter)};this.toString=function(){function d(a){var b="(",e;if(a.groups!==undefined)for(e=0;e<a.groups.length;e++){if(b.length>1)b+=a.groupOp==="OR"?" || ":" && ";b+=d(a.groups[e])}if(a.rules!==undefined)for(e=0;e<a.rules.length;e++){if(b.length>1)b+=a.groupOp==="OR"?" || ":" && ";var g=a.rules[e];
|
336
|
+
if(f.p.errorcheck){var j=void 0,h=void 0;for(j=0;j<f.p.columns.length;j++)if(f.p.columns[j].name===g.field){h=f.p.columns[j];break}h&&z(g.data,h)}b+=g.op+"(item."+g.field+",'"+g.data+"')"}b+=")";return b==="()"?"":b}var f=this;return d(this.p.filter)};this.reDraw();if(this.p.showQuery)this.onchange();this.filter=true}}})};c.extend(c.fn.jqFilter,{toSQLString:function(){var k="";this.each(function(){k=this.toUserFriendlyString()});return k},filterData:function(){var k;this.each(function(){k=this.p.filter});
|
337
|
+
return k},getParameter:function(k){if(k!==undefined)if(this.p.hasOwnProperty(k))return this.p[k];return this.p},resetFilter:function(){return this.each(function(){this.resetFilter()})},addFilter:function(k){if(typeof k==="string")k=jQuery.jgrid.parse(k);this.each(function(){this.p.filter=k;this.reDraw();this.onchange()})}})})(jQuery);
|
338
|
+
(function(a){a.jgrid.extend({editRow:function(f,x,m,r,t,y,u,k,s){var g={keys:x||false,oneditfunc:m||null,successfunc:r||null,url:t||null,extraparam:y||{},aftersavefunc:u||null,errorfunc:k||null,afterrestorefunc:s||null,restoreAfterErorr:true},o=a.makeArray(arguments).slice(1),b;b=o[0]&&typeof o[0]=="object"&&!a.isFunction(o[0])?a.extend(g,o[0]):g;return this.each(function(){var d=this,c,j,v=0,q=null,p={},l,e;if(d.grid){l=a(d).jqGrid("getInd",f,true);if(l!==false)if((a(l).attr("editable")||"0")=="0"&&
|
339
|
+
!a(l).hasClass("not-editable-row")){e=d.p.colModel;a("td",l).each(function(h){c=e[h].name;var A=d.p.treeGrid===true&&c==d.p.ExpandColumn;if(A)j=a("span:first",this).html();else try{j=a.unformat(this,{rowId:f,colModel:e[h]},h)}catch(n){j=e[h].edittype&&e[h].edittype=="textarea"?a(this).text():a(this).html()}if(c!="cb"&&c!="subgrid"&&c!="rn"){if(d.p.autoencode)j=a.jgrid.htmlDecode(j);p[c]=j;if(e[h].editable===true){if(q===null)q=h;A?a("span:first",this).html(""):a(this).html("");var i=a.extend({},e[h].editoptions||
|
340
|
+
{},{id:f+"_"+c,name:c});if(!e[h].edittype)e[h].edittype="text";if(j==" "||j==" "||j.length==1&&j.charCodeAt(0)==160)j="";i=a.jgrid.createEl(e[h].edittype,i,j,true,a.extend({},a.jgrid.ajaxOptions,d.p.ajaxSelectOptions||{}));a(i).addClass("editable");A?a("span:first",this).append(i):a(this).append(i);e[h].edittype=="select"&&e[h].editoptions.multiple===true&&a.browser.msie&&a(i).width(a(i).width());v++}}});if(v>0){p.id=f;d.p.savedRow.push(p);a(l).attr("editable","1");a("td:eq("+q+") input",
|
341
|
+
l).focus();b.keys===true&&a(l).bind("keydown",function(h){h.keyCode===27&&a(d).jqGrid("restoreRow",f,s);if(h.keyCode===13){if(h.target.tagName=="TEXTAREA")return true;a(d).jqGrid("saveRow",f,b);return false}h.stopPropagation()});a.isFunction(b.oneditfunc)&&b.oneditfunc.call(d,f)}}}})},saveRow:function(f,x,m,r,t,y,u){var k={successfunc:x||null,url:m||null,extraparam:r||{},aftersavefunc:t||null,errorfunc:y||null,afterrestorefunc:u||null,restoreAfterErorr:true},s=a.makeArray(arguments).slice(1),g;g=
|
342
|
+
s[0]&&typeof s[0]=="object"&&!a.isFunction(s[0])?a.extend(k,s[0]):k;var o=false,b=this[0],d,c={},j={},v={},q,p,l;if(!b.grid)return o;l=a(b).jqGrid("getInd",f,true);if(l===false)return o;k=a(l).attr("editable");g.url=g.url?g.url:b.p.editurl;if(k==="1"){var e;a("td",l).each(function(n){e=b.p.colModel[n];d=e.name;if(d!="cb"&&d!="subgrid"&&e.editable===true&&d!="rn"&&!a(this).hasClass("not-editable-cell")){switch(e.edittype){case "checkbox":var i=["Yes","No"];if(e.editoptions)i=e.editoptions.value.split(":");
|
343
|
+
c[d]=a("input",this).attr("checked")?i[0]:i[1];break;case "text":case "password":case "textarea":case "button":c[d]=a("input, textarea",this).val();break;case "select":if(e.editoptions.multiple){i=a("select",this);var w=[];c[d]=a(i).val();c[d]=c[d]?c[d].join(","):"";a("select > option:selected",this).each(function(B,C){w[B]=a(C).text()});j[d]=w.join(",")}else{c[d]=a("select>option:selected",this).val();j[d]=a("select>option:selected",this).text()}if(e.formatter&&e.formatter=="select")j={};break;case "custom":try{if(e.editoptions&&
|
344
|
+
a.isFunction(e.editoptions.custom_value)){c[d]=e.editoptions.custom_value.call(b,a(".customelement",this),"get");if(c[d]===undefined)throw"e2";}else throw"e1";}catch(z){z=="e1"&&a.jgrid.info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_value' "+a.jgrid.edit.msg.nodefined,jQuery.jgrid.edit.bClose);z=="e2"?a.jgrid.info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_value' "+a.jgrid.edit.msg.novalue,jQuery.jgrid.edit.bClose):a.jgrid.info_dialog(jQuery.jgrid.errors.errcap,z.message,jQuery.jgrid.edit.bClose)}}p=
|
345
|
+
a.jgrid.checkValues(c[d],n,b);if(p[0]===false){p[1]=c[d]+" "+p[1];return false}if(b.p.autoencode)c[d]=a.jgrid.htmlEncode(c[d]);if(g.url!=="clientArray"&&e.editoptions&&e.editoptions.NullIfEmpty===true)if(c[d]=="")v[d]="null"}});if(p[0]===false){try{var h=a.jgrid.findPos(a("#"+a.jgrid.jqID(f),b.grid.bDiv)[0]);a.jgrid.info_dialog(a.jgrid.errors.errcap,p[1],a.jgrid.edit.bClose,{left:h[0],top:h[1]})}catch(A){alert(p[1])}return o}if(c){k=b.p.prmNames;s=k.oper;h=k.id;c[s]=k.editoper;c[h]=f;if(typeof b.p.inlineData==
|
346
|
+
"undefined")b.p.inlineData={};c=a.extend({},c,b.p.inlineData,g.extraparam)}if(g.url=="clientArray"){c=a.extend({},c,j);b.p.autoencode&&a.each(c,function(n,i){c[n]=a.jgrid.htmlDecode(i)});h=a(b).jqGrid("setRowData",f,c);a(l).attr("editable","0");for(k=0;k<b.p.savedRow.length;k++)if(b.p.savedRow[k].id==f){q=k;break}q>=0&&b.p.savedRow.splice(q,1);a.isFunction(g.aftersavefunc)&&g.aftersavefunc.call(b,f,h);o=true}else{a("#lui_"+b.p.id).show();v=a.extend({},c,v);a.ajax(a.extend({url:g.url,data:a.isFunction(b.p.serializeRowData)?
|
347
|
+
b.p.serializeRowData.call(b,v):v,type:"POST",async:false,complete:function(n,i){a("#lui_"+b.p.id).hide();if(i==="success")if((a.isFunction(g.successfunc)?g.successfunc.call(b,n):true)===true){b.p.autoencode&&a.each(c,function(z,B){c[z]=a.jgrid.htmlDecode(B)});c=a.extend({},c,j);a(b).jqGrid("setRowData",f,c);a(l).attr("editable","0");for(var w=0;w<b.p.savedRow.length;w++)if(b.p.savedRow[w].id==f){q=w;break}q>=0&&b.p.savedRow.splice(q,1);a.isFunction(g.aftersavefunc)&&g.aftersavefunc.call(b,f,n);o=
|
348
|
+
true}else{a.isFunction(g.errorfunc)&&g.errorfunc.call(b,f,n,i);g.restoreAfterError===true&&a(b).jqGrid("restoreRow",f,g.afterrestorefunc)}},error:function(n,i){a("#lui_"+b.p.id).hide();if(a.isFunction(g.errorfunc))g.errorfunc.call(b,f,n,i);else try{jQuery.jgrid.info_dialog(jQuery.jgrid.errors.errcap,'<div class="ui-state-error">'+n.responseText+"</div>",jQuery.jgrid.edit.bClose,{buttonalign:"right"})}catch(w){alert(n.responseText)}g.restoreAfterError===true&&a(b).jqGrid("restoreRow",f,g.afterrestorefunc)}},
|
349
|
+
a.jgrid.ajaxOptions,b.p.ajaxRowOptions||{}))}a(l).unbind("keydown")}return o},restoreRow:function(f,x){return this.each(function(){var m=this,r,t,y={};if(m.grid){t=a(m).jqGrid("getInd",f,true);if(t!==false){for(var u=0;u<m.p.savedRow.length;u++)if(m.p.savedRow[u].id==f){r=u;break}if(r>=0){if(a.isFunction(a.fn.datepicker))try{a("input.hasDatepicker","#"+a.jgrid.jqID(t.id)).datepicker("hide")}catch(k){}a.each(m.p.colModel,function(){if(this.editable===true&&this.name in m.p.savedRow[r]&&!a(this).hasClass("not-editable-cell"))y[this.name]=
|
350
|
+
m.p.savedRow[r][this.name]});a(m).jqGrid("setRowData",f,y);a(t).attr("editable","0").unbind("keydown");m.p.savedRow.splice(r,1)}a.isFunction(x)&&x.call(m,f)}}})}})})(jQuery);
|
351
|
+
(function(b){b.jgrid.extend({editCell:function(d,f,a){return this.each(function(){var c=this,h,e,g,i;if(!(!c.grid||c.p.cellEdit!==true)){f=parseInt(f,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&&f==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);i=c.p.colModel[f];h=i.name;if(!(h=="subgrid"||h=="cb"||h=="rn")){g=b("td:eq("+
|
352
|
+
f+")",c.rows[d]);if(i.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{e=b.unformat(g,{rowId:c.rows[d].id,colModel:i},f)}catch(k){e=i.edittype&&i.edittype=="textarea"?b(g).text():b(g).html()}if(c.p.autoencode)e=
|
353
|
+
b.jgrid.htmlDecode(e);if(!i.edittype)i.edittype="text";c.p.savedRow.push({id:d,ic:f,name:h,v:e});if(e==" "||e==" "||e.length==1&&e.charCodeAt(0)==160)e="";if(b.isFunction(c.p.formatCell)){var j=c.p.formatCell.call(c,c.rows[d].id,h,e,d,f);if(j!==undefined)e=j}j=b.extend({},i.editoptions||{},{id:d+"_"+h,name:h});var m=b.jgrid.createEl(i.edittype,j,e,true,b.extend({},b.jgrid.ajaxOptions,c.p.ajaxSelectOptions||{}));b.isFunction(c.p.beforeEditCell)&&c.p.beforeEditCell.call(c,c.rows[d].id,h,e,
|
354
|
+
d,f);b(g).html("").append(m).attr("tabindex","0");window.setTimeout(function(){b(m).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,f):b("input.hasDatepicker",g).datepicker("hide");else b(c).jqGrid("restoreCell",d,f);l.keyCode===13&&b(c).jqGrid("saveCell",d,f);if(l.keyCode==9)if(c.grid.hDiv.loading)return false;else l.shiftKey?b(c).jqGrid("prevCell",d,f):b(c).jqGrid("nextCell",
|
355
|
+
d,f);l.stopPropagation()});b.isFunction(c.p.afterEditCell)&&c.p.afterEditCell.call(c,c.rows[d].id,h,e,d,f)}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)){e=g.html().replace(/\ \;/ig,"");c.p.onSelectCell.call(c,
|
356
|
+
c.rows[d].id,h,e,d,f)}}c.p.iCol=f;c.p.iRow=d}}})},saveCell:function(d,f){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("+f+")",a.rows[d]),e,g,i=a.p.colModel[f],k=i.name,j=b.jgrid.jqID(k);switch(i.edittype){case "select":if(i.editoptions.multiple){j=b("#"+d+"_"+j,a.rows[d]);var m=[];if(e=b(j).val())e.join(",");else e="";b("option:selected",j).each(function(o,p){m[o]=b(p).text()});g=m.join(",")}else{e=b("#"+d+
|
357
|
+
"_"+j+">option:selected",a.rows[d]).val();g=b("#"+d+"_"+j+">option:selected",a.rows[d]).text()}if(i.formatter)g=e;break;case "checkbox":var l=["Yes","No"];if(i.editoptions)l=i.editoptions.value.split(":");g=e=b("#"+d+"_"+j,a.rows[d]).attr("checked")?l[0]:l[1];break;case "password":case "text":case "textarea":case "button":g=e=b("#"+d+"_"+j,a.rows[d]).val();break;case "custom":try{if(i.editoptions&&b.isFunction(i.editoptions.custom_value)){e=i.editoptions.custom_value.call(a,b(".customelement",h),
|
358
|
+
"get");if(e===undefined)throw"e2";else g=e}else throw"e1";}catch(q){q=="e1"&&b.jgrid.info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_value' "+b.jgrid.edit.msg.nodefined,jQuery.jgrid.edit.bClose);q=="e2"?b.jgrid.info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_value' "+b.jgrid.edit.msg.novalue,jQuery.jgrid.edit.bClose):b.jgrid.info_dialog(jQuery.jgrid.errors.errcap,q.message,jQuery.jgrid.edit.bClose)}}if(g!==a.p.savedRow[c].v){if(b.isFunction(a.p.beforeSaveCell))if(c=a.p.beforeSaveCell.call(a,
|
359
|
+
a.rows[d].id,k,e,d,f))g=e=c;var r=b.jgrid.checkValues(e,f,a);if(r[0]===true){c={};if(b.isFunction(a.p.beforeSubmitCell))(c=a.p.beforeSubmitCell.call(a,a.rows[d].id,k,e,d,f))||(c={});b("input.hasDatepicker",h).length>0&&b("input.hasDatepicker",h).datepicker("hide");if(a.p.cellsubmit=="remote")if(a.p.cellurl){var n={};if(a.p.autoencode)e=b.jgrid.htmlEncode(e);n[k]=e;l=a.p.prmNames;i=l.id;j=l.oper;n[i]=a.rows[d].id;n[j]=l.editoper;n=b.extend(c,n);b("#lui_"+a.p.id).show();a.grid.hDiv.loading=true;b.ajax(b.extend({url:a.p.cellurl,
|
360
|
+
data:b.isFunction(a.p.serializeCellData)?a.p.serializeCellData.call(a,n):n,type:"POST",complete:function(o,p){b("#lui_"+a.p.id).hide();a.grid.hDiv.loading=false;if(p=="success")if(b.isFunction(a.p.afterSubmitCell)){var s=a.p.afterSubmitCell.call(a,o,n.id,k,e,d,f);if(s[0]===true){b(h).empty();b(a).jqGrid("setCell",a.rows[d].id,f,g,false,false,true);b(h).addClass("dirty-cell");b(a.rows[d]).addClass("edited");b.isFunction(a.p.afterSaveCell)&&a.p.afterSaveCell.call(a,a.rows[d].id,k,e,d,f);a.p.savedRow.splice(0,
|
361
|
+
1)}else{b.jgrid.info_dialog(b.jgrid.errors.errcap,s[1],b.jgrid.edit.bClose);b(a).jqGrid("restoreCell",d,f)}}else{b(h).empty();b(a).jqGrid("setCell",a.rows[d].id,f,g,false,false,true);b(h).addClass("dirty-cell");b(a.rows[d]).addClass("edited");b.isFunction(a.p.afterSaveCell)&&a.p.afterSaveCell.call(a,a.rows[d].id,k,e,d,f);a.p.savedRow.splice(0,1)}},error:function(o,p){b("#lui_"+a.p.id).hide();a.grid.hDiv.loading=false;b.isFunction(a.p.errorCell)?a.p.errorCell.call(a,o,p):b.jgrid.info_dialog(b.jgrid.errors.errcap,
|
362
|
+
o.status+" : "+o.statusText+"<br/>"+p,b.jgrid.edit.bClose);b(a).jqGrid("restoreCell",d,f)}},b.jgrid.ajaxOptions,a.p.ajaxCellOptions||{}))}else try{b.jgrid.info_dialog(b.jgrid.errors.errcap,b.jgrid.errors.nourl,b.jgrid.edit.bClose);b(a).jqGrid("restoreCell",d,f)}catch(t){}if(a.p.cellsubmit=="clientArray"){b(h).empty();b(a).jqGrid("setCell",a.rows[d].id,f,g,false,false,true);b(h).addClass("dirty-cell");b(a.rows[d]).addClass("edited");b.isFunction(a.p.afterSaveCell)&&a.p.afterSaveCell.call(a,a.rows[d].id,
|
363
|
+
k,e,d,f);a.p.savedRow.splice(0,1)}}else try{window.setTimeout(function(){b.jgrid.info_dialog(b.jgrid.errors.errcap,e+" "+r[1],b.jgrid.edit.bClose)},100);b(a).jqGrid("restoreCell",d,f)}catch(u){}}else b(a).jqGrid("restoreCell",d,f)}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,f){return this.each(function(){var a=this,c;if(!(!a.grid||a.p.cellEdit!==true)){c=a.p.savedRow.length>=1?
|
364
|
+
0:null;if(c!==null){var h=b("td:eq("+f+")",a.rows[d]);if(b.isFunction(b.fn.datepicker))try{b("input.hasDatepicker",h).datepicker("hide")}catch(e){}b(h).empty().attr("tabindex","-1");b(a).jqGrid("setCell",a.rows[d].id,f,a.p.savedRow[c].v,false,false,true);b.isFunction(a.p.afterRestoreCell)&&a.p.afterRestoreCell.call(a,a.rows[d].id,a.p.savedRow[c].v,d,f);a.p.savedRow.splice(0,1)}window.setTimeout(function(){b("#"+a.p.knv).attr("tabindex","-1").focus()},0)}})},nextCell:function(d,f){return this.each(function(){var a=
|
365
|
+
false;if(!(!this.grid||this.p.cellEdit!==true)){for(var c=f+1;c<this.p.colModel.length;c++)if(this.p.colModel[c].editable===true){a=c;break}if(a!==false)b(this).jqGrid("editCell",d,a,true);else this.p.savedRow.length>0&&b(this).jqGrid("saveCell",d,f)}})},prevCell:function(d,f){return this.each(function(){var a=false;if(!(!this.grid||this.p.cellEdit!==true)){for(var c=f-1;c>=0;c--)if(this.p.colModel[c].editable===true){a=c;break}if(a!==false)b(this).jqGrid("editCell",d,a,true);else this.p.savedRow.length>
|
366
|
+
0&&b(this).jqGrid("saveCell",d,f)}})},GridNav:function(){return this.each(function(){function d(g,i,k){if(k.substr(0,1)=="v"){var j=b(a.grid.bDiv)[0].clientHeight,m=b(a.grid.bDiv)[0].scrollTop,l=a.rows[g].offsetTop+a.rows[g].clientHeight,q=a.rows[g].offsetTop;if(k=="vd")if(l>=j)b(a.grid.bDiv)[0].scrollTop=b(a.grid.bDiv)[0].scrollTop+a.rows[g].clientHeight;if(k=="vu")if(q<m)b(a.grid.bDiv)[0].scrollTop=b(a.grid.bDiv)[0].scrollTop-a.rows[g].clientHeight}if(k=="h"){k=b(a.grid.bDiv)[0].clientWidth;j=b(a.grid.bDiv)[0].scrollLeft;
|
367
|
+
m=a.rows[g].cells[i].offsetLeft;if(a.rows[g].cells[i].offsetLeft+a.rows[g].cells[i].clientWidth>=k+parseInt(j,10))b(a.grid.bDiv)[0].scrollLeft=b(a.grid.bDiv)[0].scrollLeft+a.rows[g].cells[i].clientWidth;else if(m<j)b(a.grid.bDiv)[0].scrollLeft=b(a.grid.bDiv)[0].scrollLeft-a.rows[g].cells[i].clientWidth}}function f(g,i){var k,j;if(i=="lft"){k=g+1;for(j=g;j>=0;j--)if(a.p.colModel[j].hidden!==true){k=j;break}}if(i=="rgt"){k=g-1;for(j=g;j<a.p.colModel.length;j++)if(a.p.colModel[j].hidden!==true){k=j;
|
368
|
+
break}}return k}var a=this;if(!(!a.grid||a.p.cellEdit!==true)){a.p.knv=a.p.id+"_kn";var c=b("<span style='width:0px;height:0px;background-color:black;' tabindex='0'><span tabindex='-1' style='width:0px;height:0px;background-color:grey' id='"+a.p.knv+"'></span></span>"),h,e;b(c).insertBefore(a.grid.cDiv);b("#"+a.p.knv).focus().keydown(function(g){e=g.keyCode;if(a.p.direction=="rtl")if(e==37)e=39;else if(e==39)e=37;switch(e){case 38:if(a.p.iRow-1>0){d(a.p.iRow-1,a.p.iCol,"vu");b(a).jqGrid("editCell",
|
369
|
+
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=f(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=f(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,
|
370
|
+
true)}return false})}})},getChangedCells:function(d){var f=[];d||(d="all");this.each(function(){var a=this,c;!a.grid||a.p.cellEdit!==true||b(a.rows).each(function(h){var e={};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{e[c]=b.unformat(this,{rowId:a.rows[h].id,colModel:a.p.colModel[g]},g)}catch(i){e[c]=b.jgrid.htmlDecode(b(this).html())}}else try{e[c]=b.unformat(this,{rowId:a.rows[h].id,
|
371
|
+
colModel:a.p.colModel[g]},g)}catch(k){e[c]=b.jgrid.htmlDecode(b(this).html())}});e.id=this.id;f.push(e)}})});return f}})})(jQuery);
|
372
|
+
(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 j[this._jqm].c=b.extend({},j[this._jqm].c,a);l++;this._jqm=l;j[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=
|
373
|
+
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=j[a],d=c.c,i="."+d.closeClass,g=parseInt(c.w.css("z-index"));g=g>0?g:3E3;var h=b("<div></div>").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]||
|
374
|
+
setTimeout(function(){p("bind")},1);k.push(a)}else if(d.overlay>0)d.closeoverlay&&c.w.jqmAddClose(h);else h=e;c.o=h?h.addClass(d.overlayClass).prependTo("body"):e;if(q){b("html,body").css({height:"100%",width:"100%"});if(h){h=h.css({position:"absolute"})[0];for(var m in{Top:1,Left:1})h.style.setExpression(m.toLowerCase(),"(_=(document.documentElement.scroll"+m+" || document.body.scroll"+m+"))+'px'")}}if(d.ajax){g=d.target||c.w;h=d.ajax;g=typeof g=="string"?b(g,c.w):b(g);h=h.substr(0,1)=="@"?b(f).attr(h.substring(1)):
|
375
|
+
h;g.html(d.ajaxText).load(h,function(){d.onLoad&&d.onLoad.call(this,c);i&&c.w.jqmAddClose(b(i,c.w));r(c)})}else i&&c.w.jqmAddClose(b(i,c.w));d.toTop&&c.o&&c.w.before('<span id="jqmP'+c.w[0]._jqm+'"></span>').insertAfter(c.o);d.onShow?d.onShow(c):c.w.show();r(c);return e},close:function(a){a=j[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=
|
376
|
+
0,j=b.jqm.hash,k=[],q=b.browser.msie&&b.browser.version=="6.0",e=false,r=function(a){var f=b('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0});if(q)if(a.o)a.o.html('<p style="width:100%;height:100%"/>').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=j[k[k.length-1]];(a=!b(a.target).parents(".jqmID"+
|
377
|
+
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 i in{jqmShow:1,jqmHide:1})for(var g in this[i])if(j[this[i][g]])j[this[i][g]].w[i](this);return e})}this[c].push(d)})})}})(jQuery);
|
378
|
+
(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,
|
379
|
+
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,
|
380
|
+
k:j.k}:false;if(b("input.hasDatepicker",d[0])[0])try{b("input.hasDatepicker",d[0]).datepicker("hide")}catch(p){}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);
|
381
|
+
(function(b){b.jgrid.extend({setSubGrid:function(){return this.each(function(){var f;this.p.subGridOptions=b.extend({plusicon:"ui-icon-plus",minusicon:"ui-icon-minus",openicon:"ui-icon-carat-1-sw",expandOnLoad:false,delayOnLoad:50,selectOnExpand:false,reloadOnExpand:true},this.p.subGridOptions||{});this.p.colNames.unshift("");this.p.colModel.unshift({name:"subgrid",width:b.browser.safari?this.p.subGridWidth+this.p.cellLayout:this.p.subGridWidth,sortable:false,resizable:false,hidedlg:true,search:false,
|
382
|
+
fixed:true});f=this.p.subGridModel;if(f[0]){f[0].align=b.extend([],f[0].align||[]);for(var d=0;d<f[0].name.length;d++)f[0].align[d]=f[0].align[d]||"left"}})},addSubGridCell:function(f,d){var a="",n,s;this.each(function(){a=this.formatCol(f,d);s=this.p.id;n=this.p.subGridOptions.plusicon});return'<td role="grid" aria-describedby="'+s+'_subgrid" class="ui-sgcollapsed sgcollapsed" '+a+"><a href='javascript:void(0);'><span class='ui-icon "+n+"'></span></a></td>"},addSubGrid:function(f,d){return this.each(function(){var a=
|
383
|
+
this;if(a.grid){var n=function(g,j,e){j=b("<td align='"+a.p.subGridModel[0].align[e]+"'></td>").html(j);b(g).append(j)},s=function(g,j){var e,c,h,k=b("<table cellspacing='0' cellpadding='0' border='0'><tbody></tbody></table>"),i=b("<tr></tr>");for(c=0;c<a.p.subGridModel[0].name.length;c++){e=b("<th class='ui-state-default ui-th-subgrid ui-th-column ui-th-"+a.p.direction+"'></th>");b(e).html(a.p.subGridModel[0].name[c]);b(e).width(a.p.subGridModel[0].width[c]);b(i).append(e)}b(k).append(i);if(g){h=
|
384
|
+
a.p.xmlReader.subgrid;b(h.root+" "+h.row,g).each(function(){i=b("<tr class='ui-widget-content ui-subtblcell'></tr>");if(h.repeatitems===true)b(h.cell,this).each(function(m){n(i,b(this).text()||" ",m)});else{var o=a.p.subGridModel[0].mapping||a.p.subGridModel[0].name;if(o)for(c=0;c<o.length;c++)n(i,b(o[c],this).text()||" ",c)}b(k).append(i)})}e=b("table:first",a.grid.bDiv).attr("id")+"_";b("#"+e+j).append(k);a.grid.hDiv.loading=false;b("#load_"+a.p.id).hide();return false},v=function(g,j){var e,
|
385
|
+
c,h,k,i,o=b("<table cellspacing='0' cellpadding='0' border='0'><tbody></tbody></table>"),m=b("<tr></tr>");for(c=0;c<a.p.subGridModel[0].name.length;c++){e=b("<th class='ui-state-default ui-th-subgrid ui-th-column ui-th-"+a.p.direction+"'></th>");b(e).html(a.p.subGridModel[0].name[c]);b(e).width(a.p.subGridModel[0].width[c]);b(m).append(e)}b(o).append(m);if(g){k=a.p.jsonReader.subgrid;e=g[k.root];if(typeof e!=="undefined")for(c=0;c<e.length;c++){h=e[c];m=b("<tr class='ui-widget-content ui-subtblcell'></tr>");
|
386
|
+
if(k.repeatitems===true){if(k.cell)h=h[k.cell];for(i=0;i<h.length;i++)n(m,h[i]||" ",i)}else{var u=a.p.subGridModel[0].mapping||a.p.subGridModel[0].name;if(u.length)for(i=0;i<u.length;i++)n(m,h[u[i]]||" ",i)}b(o).append(m)}}c=b("table:first",a.grid.bDiv).attr("id")+"_";b("#"+c+j).append(o);a.grid.hDiv.loading=false;b("#load_"+a.p.id).hide();return false},z=function(g){var j,e,c,h;j=b(g).attr("id");e={nd_:(new Date).getTime()};e[a.p.prmNames.subgridid]=j;if(!a.p.subGridModel[0])return false;
|
387
|
+
if(a.p.subGridModel[0].params)for(h=0;h<a.p.subGridModel[0].params.length;h++)for(c=0;c<a.p.colModel.length;c++)if(a.p.colModel[c].name==a.p.subGridModel[0].params[h])e[a.p.colModel[c].name]=b("td:eq("+c+")",g).text().replace(/\ \;/ig,"");if(!a.grid.hDiv.loading){a.grid.hDiv.loading=true;b("#load_"+a.p.id).show();if(!a.p.subgridtype)a.p.subgridtype=a.p.datatype;if(b.isFunction(a.p.subgridtype))a.p.subgridtype.call(a,e);else a.p.subgridtype=a.p.subgridtype.toLowerCase();switch(a.p.subgridtype){case "xml":case "json":b.ajax(b.extend({type:a.p.mtype,
|
388
|
+
url:a.p.subGridUrl,dataType:a.p.subgridtype,data:b.isFunction(a.p.serializeSubGridData)?a.p.serializeSubGridData.call(a,e):e,complete:function(k){a.p.subgridtype=="xml"?s(k.responseXML,j):v(b.jgrid.parse(k.responseText),j)}},b.jgrid.ajaxOptions,a.p.ajaxSubgridOptions||{}))}}return false},l,t,w,x=0,p,q;b.each(a.p.colModel,function(){if(this.hidden===true||this.name=="rn"||this.name=="cb")x++});var y=a.rows.length,r=1;if(d!==undefined&&d>0){r=d;y=d+1}for(;r<y;){b(a.rows[r]).hasClass("jqgrow")&&b(a.rows[r].cells[f]).bind("click",
|
389
|
+
function(){var g=b(this).parent("tr")[0];q=g.nextSibling;if(b(this).hasClass("sgcollapsed")){t=a.p.id;l=g.id;if(a.p.subGridOptions.reloadOnExpand===true||a.p.subGridOptions.reloadOnExpand===false&&!b(q).hasClass("ui-subgrid")){w=f>=1?"<td colspan='"+f+"'> </td>":"";p=true;if(b.isFunction(a.p.subGridBeforeExpand))p=a.p.subGridBeforeExpand.call(a,t+"_"+l,l);if(p===false)return false;b(g).after("<tr role='row' class='ui-subgrid'>"+w+"<td class='ui-widget-content subgrid-cell'><span class='ui-icon "+
|
390
|
+
a.p.subGridOptions.openicon+"'></span></td><td colspan='"+parseInt(a.p.colNames.length-1-x,10)+"' class='ui-widget-content subgrid-data'><div id="+t+"_"+l+" class='tablediv'></div></td></tr>");b.isFunction(a.p.subGridRowExpanded)?a.p.subGridRowExpanded.call(a,t+"_"+l,l):z(g)}else b(q).show();b(this).html("<a href='javascript:void(0);'><span class='ui-icon "+a.p.subGridOptions.minusicon+"'></span></a>").removeClass("sgcollapsed").addClass("sgexpanded");a.p.subGridOptions.selectOnExpand&&b(a).jqGrid("setSelection",
|
391
|
+
l)}else if(b(this).hasClass("sgexpanded")){p=true;if(b.isFunction(a.p.subGridRowColapsed)){l=g.id;p=a.p.subGridRowColapsed.call(a,t+"_"+l,l)}if(p===false)return false;if(a.p.subGridOptions.reloadOnExpand===true)b(q).remove(".ui-subgrid");else b(q).hasClass("ui-subgrid")&&b(q).hide();b(this).html("<a href='javascript:void(0);'><span class='ui-icon "+a.p.subGridOptions.plusicon+"'></span></a>").removeClass("sgexpanded").addClass("sgcollapsed")}return false});a.p.subGridOptions.expandOnLoad===true&&
|
392
|
+
b(a.rows[r].cells[f]).trigger("click");r++}a.subGridXml=function(g,j){s(g,j)};a.subGridJson=function(g,j){v(g,j)}}})},expandSubGridRow:function(f){return this.each(function(){if(this.grid||f)if(this.p.subGrid===true){var d=b(this).jqGrid("getInd",f,true);if(d)(d=b("td.sgcollapsed",d)[0])&&b(d).trigger("click")}})},collapseSubGridRow:function(f){return this.each(function(){if(this.grid||f)if(this.p.subGrid===true){var d=b(this).jqGrid("getInd",f,true);if(d)(d=b("td.sgexpanded",d)[0])&&b(d).trigger("click")}})},
|
393
|
+
toggleSubGridRow:function(f){return this.each(function(){if(this.grid||f)if(this.p.subGrid===true){var d=b(this).jqGrid("getInd",f,true);if(d){var a=b("td.sgcollapsed",d)[0];if(a)b(a).trigger("click");else(a=b("td.sgexpanded",d)[0])&&b(a).trigger("click")}}})}})})(jQuery);
|
394
|
+
(function(e){e.jgrid.extend({groupingSetup:function(){return this.each(function(){var a=this.p.groupingView;if(a!==null&&(typeof a==="object"||e.isFunction(a)))if(a.groupField.length){if(typeof a.visibiltyOnNextGrouping=="undefined")a.visibiltyOnNextGrouping=[];for(var b=0;b<a.groupField.length;b++){a.groupOrder[b]||(a.groupOrder[b]="asc");a.groupText[b]||(a.groupText[b]="{0}");if(typeof a.groupColumnShow[b]!="boolean")a.groupColumnShow[b]=true;if(typeof a.groupSummary[b]!="boolean")a.groupSummary[b]=
|
395
|
+
false;if(a.groupColumnShow[b]===true){a.visibiltyOnNextGrouping[b]=true;e(this).jqGrid("showCol",a.groupField[b])}else{a.visibiltyOnNextGrouping[b]=e("#"+this.p.id+"_"+a.groupField[b]).is(":visible");e(this).jqGrid("hideCol",a.groupField[b])}a.sortitems[b]=[];a.sortnames[b]=[];a.summaryval[b]=[];if(a.groupSummary[b]){a.summary[b]=[];for(var c=this.p.colModel,d=0,g=c.length;d<g;d++)c[d].summaryType&&a.summary[b].push({nm:c[d].name,st:c[d].summaryType,v:""})}}this.p.scroll=false;this.p.rownumbers=false;
|
396
|
+
this.p.subGrid=false;this.p.treeGrid=false;this.p.gridview=true}else this.p.grouping=false;else this.p.grouping=false})},groupingPrepare:function(a,b,c,d){this.each(function(){b[0]+="";var g=b[0].toString().split(" ").join(""),h=this.p.groupingView,f=this;if(c.hasOwnProperty(g))c[g].push(a);else{c[g]=[];c[g].push(a);h.sortitems[0].push(g);h.sortnames[0].push(e.trim(b[0].toString()));h.summaryval[0][g]=e.extend(true,[],h.summary[0])}h.groupSummary[0]&&e.each(h.summaryval[0][g],function(){this.v=e.isFunction(this.st)?
|
397
|
+
this.st.call(f,this.v,this.nm,d):e(f).jqGrid("groupingCalculations."+this.st,this.v,this.nm,d)})});return c},groupingToggle:function(a){this.each(function(){var b=this.p.groupingView,c=a.lastIndexOf("_"),d=a.substring(0,c+1);c=parseInt(a.substring(c+1),10)+1;var g=b.minusicon,h=b.plusicon,f=e("#"+a)[0].nextSibling,k=e("#"+a+" span.tree-wrap-"+this.p.direction),l=false;if(k.hasClass(g)){if(b.showSummaryOnHide&&b.groupSummary[0]){if(f)for(;f;){if(e(f).hasClass("jqfoot"))break;e(f).hide();f=f.nextSibling}}else if(f)for(;f;){if(e(f).attr("id")==
|
398
|
+
d+String(c))break;e(f).hide();f=f.nextSibling}k.removeClass(g).addClass(h);l=true}else{if(f)for(;f;){if(e(f).attr("id")==d+String(c))break;e(f).show();f=f.nextSibling}k.removeClass(h).addClass(g);l=false}e.isFunction(this.p.onClickGroup)&&this.p.onClickGroup.call(this,a,l)});return false},groupingRender:function(a,b){return this.each(function(){var c=this,d=c.p.groupingView,g="",h="",f,k="",l,r,m;if(!d.groupDataSorted){d.sortitems[0].sort();d.sortnames[0].sort();if(d.groupOrder[0].toLowerCase()==
|
399
|
+
"desc"){d.sortitems[0].reverse();d.sortnames[0].reverse()}}k=d.groupCollapse?d.plusicon:d.minusicon;k+=" tree-wrap-"+c.p.direction;for(m=0;m<b;){if(c.p.colModel[m].name==d.groupField[0]){r=m;break}m++}e.each(d.sortitems[0],function(o,n){f=c.p.id+"ghead_"+o;h="<span style='cursor:pointer;' class='ui-icon "+k+"' onclick=\"jQuery('#"+c.p.id+"').jqGrid('groupingToggle','"+f+"');return false;\"></span>";try{l=c.formatter(f,d.sortnames[0][o],r,d.sortitems[0])}catch(v){l=d.sortnames[0][o]}g+='<tr id="'+
|
400
|
+
f+'" role="row" class= "ui-widget-content jqgroup ui-row-'+c.p.direction+'"><td colspan="'+b+'">'+h+e.jgrid.format(d.groupText[0],l,a[n].length)+"</td></tr>";for(var i=0;i<a[n].length;i++)g+=a[n][i].join("");if(d.groupSummary[0]){i="";if(d.groupCollapse&&!d.showSummaryOnHide)i=' style="display:none;"';g+="<tr"+i+' role="row" class="ui-widget-content jqfoot ui-row-'+c.p.direction+'">';i=d.summaryval[0][n];for(var p=c.p.colModel,q,s=a[n].length,j=0;j<b;j++){var t="<td "+c.formatCol(j,1,"")+"> </td>",
|
401
|
+
u="{0}";e.each(i,function(){if(this.nm==p[j].name){if(p[j].summaryTpl)u=p[j].summaryTpl;if(this.st=="avg")if(this.v&&s>0)this.v/=s;try{q=c.formatter("",this.v,j,this)}catch(w){q=this.v}t="<td "+c.formatCol(j,1,"")+">"+e.jgrid.format(u,q)+"</td>";return false}});g+=t}g+="</tr>"}});e("#"+c.p.id+" tbody:first").append(g);g=null})},groupingGroupBy:function(a,b){return this.each(function(){if(typeof a=="string")a=[a];var c=this.p.groupingView;this.p.grouping=true;for(var d=0;d<c.groupField.length;d++)!c.groupColumnShow[d]&&
|
402
|
+
c.visibiltyOnNextGrouping[d]&&e(this).jqGrid("showCol",c.groupField[d]);for(d=0;d<a.length;d++)c.visibiltyOnNextGrouping[d]=e("#"+this.p.id+"_"+a[d]).is(":visible");this.p.groupingView=e.extend(this.p.groupingView,b||{});c.groupField=a;e(this).trigger("reloadGrid")})},groupingRemove:function(a){return this.each(function(){if(typeof a=="undefined")a=true;this.p.grouping=false;if(a===true){for(var b=this.p.groupingView,c=0;c<b.groupField.length;c++)!b.groupColumnShow[c]&&b.visibiltyOnNextGrouping[c]&&
|
403
|
+
e(this).jqGrid("showCol",b.groupField);e("tr.jqgroup, tr.jqfoot","#"+this.p.id+" tbody:first").remove();e("tr.jqgrow:hidden","#"+this.p.id+" tbody:first").show()}else e(this).trigger("reloadGrid")})},groupingCalculations:{sum:function(a,b,c){return parseFloat(a||0)+parseFloat(c[b]||0)},min:function(a,b,c){if(a==="")return parseFloat(c[b]||0);return Math.min(parseFloat(a),parseFloat(c[b]||0))},max:function(a,b,c){if(a==="")return parseFloat(c[b]||0);return Math.max(parseFloat(a),parseFloat(c[b]||0))},
|
404
|
+
count:function(a,b,c){if(a==="")a=0;return c.hasOwnProperty(b)?a+1:0},avg:function(a,b,c){return parseFloat(a||0)+parseFloat(c[b]||0)}}})})(jQuery);
|
405
|
+
(function(d){d.jgrid.extend({setTreeNode:function(b,c){return this.each(function(){var a=this;if(a.grid&&a.p.treeGrid)for(var e=a.p.expColInd,g=a.p.treeReader.expanded_field,h=a.p.treeReader.leaf_field,f=a.p.treeReader.level_field,k=a.p.treeReader.icon_field,i=a.p.treeReader.loaded,j,o,n,l;b<c;){l=a.p.data[a.p._index[a.rows[b].id]];if(a.p.treeGridModel=="nested")if(!l[h]){j=parseInt(l[a.p.treeReader.left_field],10);o=parseInt(l[a.p.treeReader.right_field],10);l[h]=o===j+1?"true":"false";a.rows[b].cells[a.p._treeleafpos].innerHTML=
|
406
|
+
l[h]}j=parseInt(l[f],10);if(a.p.tree_root_level===0){n=j+1;o=j}else{n=j;o=j-1}n="<div class='tree-wrap tree-wrap-"+a.p.direction+"' style='width:"+n*18+"px;'>";n+="<div style='"+(a.p.direction=="rtl"?"right:":"left:")+o*18+"px;' class='ui-icon ";if(l[i]!==undefined)l[i]=l[i]=="true"||l[i]===true?true:false;if(l[h]=="true"||l[h]===true){n+=(l[k]!==undefined&&l[k]!==""?l[k]:a.p.treeIcons.leaf)+" tree-leaf treeclick'";l[h]=true;o="leaf"}else{l[h]=false;o=""}l[g]=(l[g]=="true"||l[g]===true?true:false)&&
|
407
|
+
l[i];n+=l[g]===true?a.p.treeIcons.minus+" tree-minus treeclick'":a.p.treeIcons.plus+" tree-plus treeclick'";n+="</div></div>";d(a.rows[b].cells[e]).wrapInner("<span class='cell-wrapper"+o+"'></span>").prepend(n);if(j!==parseInt(a.p.tree_root_level,10))(l=(l=d(a).jqGrid("getNodeParent",l))&&l.hasOwnProperty(g)?l[g]:true)||d(a.rows[b]).css("display","none");d(a.rows[b].cells[e]).find("div.treeclick").bind("click",function(m){m=d(m.target||m.srcElement,a.rows).closest("tr.jqgrow")[0].id;m=a.p._index[m];
|
408
|
+
if(!a.p.data[m][h])if(a.p.data[m][g]){d(a).jqGrid("collapseRow",a.p.data[m]);d(a).jqGrid("collapseNode",a.p.data[m])}else{d(a).jqGrid("expandRow",a.p.data[m]);d(a).jqGrid("expandNode",a.p.data[m])}return false});a.p.ExpandColClick===true&&d(a.rows[b].cells[e]).find("span.cell-wrapper").css("cursor","pointer").bind("click",function(m){m=d(m.target||m.srcElement,a.rows).closest("tr.jqgrow")[0].id;var r=a.p._index[m];if(!a.p.data[r][h])if(a.p.data[r][g]){d(a).jqGrid("collapseRow",a.p.data[r]);d(a).jqGrid("collapseNode",
|
409
|
+
a.p.data[r])}else{d(a).jqGrid("expandRow",a.p.data[r]);d(a).jqGrid("expandNode",a.p.data[r])}d(a).jqGrid("setSelection",m);return false});b++}})},setTreeGrid:function(){return this.each(function(){var b=this,c=0,a=false,e,g,h=[];if(b.p.treeGrid){b.p.treedatatype||d.extend(b.p,{treedatatype:b.p.datatype});b.p.subGrid=false;b.p.altRows=false;b.p.pgbuttons=false;b.p.pginput=false;b.p.gridview=true;b.p.multiselect=false;b.p.rowList=[];b.p.expColInd=0;b.p.treeIcons=d.extend({plus:"ui-icon-triangle-1-"+
|
410
|
+
(b.p.direction=="rtl"?"w":"e"),minus:"ui-icon-triangle-1-s",leaf:"ui-icon-radio-off"},b.p.treeIcons||{});if(b.p.treeGridModel=="nested")b.p.treeReader=d.extend({level_field:"level",left_field:"lft",right_field:"rgt",leaf_field:"isLeaf",expanded_field:"expanded",loaded:"loaded",icon_field:"icon"},b.p.treeReader);else if(b.p.treeGridModel=="adjacency")b.p.treeReader=d.extend({level_field:"level",parent_id_field:"parent",leaf_field:"isLeaf",expanded_field:"expanded",loaded:"loaded",icon_field:"icon"},
|
411
|
+
b.p.treeReader);for(g in b.p.colModel)if(b.p.colModel.hasOwnProperty(g)){e=b.p.colModel[g].name;if(e==b.p.ExpandColumn&&!a){a=true;b.p.expColInd=c}c++;for(var f in b.p.treeReader)b.p.treeReader[f]==e&&h.push(e)}d.each(b.p.treeReader,function(k,i){if(i&&d.inArray(i,h)===-1){if(k==="leaf_field")b.p._treeleafpos=c;c++;b.p.colNames.push(i);b.p.colModel.push({name:i,width:1,hidden:true,sortable:false,resizable:false,hidedlg:true,editable:true,search:false})}})}})},expandRow:function(b){this.each(function(){var c=
|
412
|
+
this;if(c.grid&&c.p.treeGrid){var a=d(c).jqGrid("getNodeChildren",b),e=c.p.treeReader.expanded_field;d(a).each(function(){var g=d.jgrid.getAccessor(this,c.p.localReader.id);d("#"+g,c.grid.bDiv).css("display","");this[e]&&d(c).jqGrid("expandRow",this)})}})},collapseRow:function(b){this.each(function(){var c=this;if(c.grid&&c.p.treeGrid){var a=d(c).jqGrid("getNodeChildren",b),e=c.p.treeReader.expanded_field;d(a).each(function(){var g=d.jgrid.getAccessor(this,c.p.localReader.id);d("#"+g,c.grid.bDiv).css("display",
|
413
|
+
"none");this[e]&&d(c).jqGrid("collapseRow",this)})}})},getRootNodes:function(){var b=[];this.each(function(){var c=this;if(c.grid&&c.p.treeGrid)switch(c.p.treeGridModel){case "nested":var a=c.p.treeReader.level_field;d(c.p.data).each(function(){parseInt(this[a],10)===parseInt(c.p.tree_root_level,10)&&b.push(this)});break;case "adjacency":var e=c.p.treeReader.parent_id_field;d(c.p.data).each(function(){if(this[e]===null||String(this[e]).toLowerCase()=="null")b.push(this)})}});return b},getNodeDepth:function(b){var c=
|
414
|
+
null;this.each(function(){if(this.grid&&this.p.treeGrid)switch(this.p.treeGridModel){case "nested":c=parseInt(b[this.p.treeReader.level_field],10)-parseInt(this.p.tree_root_level,10);break;case "adjacency":c=d(this).jqGrid("getNodeAncestors",b).length}});return c},getNodeParent:function(b){var c=null;this.each(function(){if(this.grid&&this.p.treeGrid)switch(this.p.treeGridModel){case "nested":var a=this.p.treeReader.left_field,e=this.p.treeReader.right_field,g=this.p.treeReader.level_field,h=parseInt(b[a],
|
415
|
+
10),f=parseInt(b[e],10),k=parseInt(b[g],10);d(this.p.data).each(function(){if(parseInt(this[g],10)===k-1&&parseInt(this[a],10)<h&&parseInt(this[e],10)>f){c=this;return false}});break;case "adjacency":var i=this.p.treeReader.parent_id_field,j=this.p.localReader.id;d(this.p.data).each(function(){if(this[j]==b[i]){c=this;return false}})}});return c},getNodeChildren:function(b){var c=[];this.each(function(){if(this.grid&&this.p.treeGrid)switch(this.p.treeGridModel){case "nested":var a=this.p.treeReader.left_field,
|
416
|
+
e=this.p.treeReader.right_field,g=this.p.treeReader.level_field,h=parseInt(b[a],10),f=parseInt(b[e],10),k=parseInt(b[g],10);d(this.p.data).each(function(){parseInt(this[g],10)===k+1&&parseInt(this[a],10)>h&&parseInt(this[e],10)<f&&c.push(this)});break;case "adjacency":var i=this.p.treeReader.parent_id_field,j=this.p.localReader.id;d(this.p.data).each(function(){this[i]==b[j]&&c.push(this)})}});return c},getFullTreeNode:function(b){var c=[];this.each(function(){var a;if(this.grid&&this.p.treeGrid)switch(this.p.treeGridModel){case "nested":var e=
|
417
|
+
this.p.treeReader.left_field,g=this.p.treeReader.right_field,h=this.p.treeReader.level_field,f=parseInt(b[e],10),k=parseInt(b[g],10),i=parseInt(b[h],10);d(this.p.data).each(function(){parseInt(this[h],10)>=i&&parseInt(this[e],10)>=f&&parseInt(this[e],10)<=k&&c.push(this)});break;case "adjacency":if(b){c.push(b);var j=this.p.treeReader.parent_id_field,o=this.p.localReader.id;d(this.p.data).each(function(n){a=c.length;for(n=0;n<a;n++)if(c[n][o]==this[j]){c.push(this);break}})}}});return c},getNodeAncestors:function(b){var c=
|
418
|
+
[];this.each(function(){if(this.grid&&this.p.treeGrid)for(var a=d(this).jqGrid("getNodeParent",b);a;){c.push(a);a=d(this).jqGrid("getNodeParent",a)}});return c},isVisibleNode:function(b){var c=true;this.each(function(){if(this.grid&&this.p.treeGrid){var a=d(this).jqGrid("getNodeAncestors",b),e=this.p.treeReader.expanded_field;d(a).each(function(){c=c&&this[e];if(!c)return false})}});return c},isNodeLoaded:function(b){var c;this.each(function(){if(this.grid&&this.p.treeGrid){var a=this.p.treeReader.leaf_field;
|
419
|
+
c=b!==undefined?b.loaded!==undefined?b.loaded:b[a]||d(this).jqGrid("getNodeChildren",b).length>0?true:false:false}});return c},expandNode:function(b){return this.each(function(){if(this.grid&&this.p.treeGrid){var c=this.p.treeReader.expanded_field,a=this.p.treeReader.parent_id_field,e=this.p.treeReader.loaded,g=this.p.treeReader.level_field,h=this.p.treeReader.left_field,f=this.p.treeReader.right_field;if(!b[c]){var k=d.jgrid.getAccessor(b,this.p.localReader.id),i=d("#"+k,this.grid.bDiv)[0],j=this.p._index[k];
|
420
|
+
if(d(this).jqGrid("isNodeLoaded",this.p.data[j])){b[c]=true;d("div.treeclick",i).removeClass(this.p.treeIcons.plus+" tree-plus").addClass(this.p.treeIcons.minus+" tree-minus")}else{b[c]=true;d("div.treeclick",i).removeClass(this.p.treeIcons.plus+" tree-plus").addClass(this.p.treeIcons.minus+" tree-minus");this.p.treeANode=i.rowIndex;this.p.datatype=this.p.treedatatype;this.p.treeGridModel=="nested"?d(this).jqGrid("setGridParam",{postData:{nodeid:k,n_left:b[h],n_right:b[f],n_level:b[g]}}):d(this).jqGrid("setGridParam",
|
421
|
+
{postData:{nodeid:k,parentid:b[a],n_level:b[g]}});d(this).trigger("reloadGrid");b[e]=true;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(b){return this.each(function(){if(this.grid&&this.p.treeGrid)if(b.expanded){b.expanded=false;var c=d.jgrid.getAccessor(b,this.p.localReader.id);c=d("#"+c,this.grid.bDiv)[0];d("div.treeclick",
|
422
|
+
c).removeClass(this.p.treeIcons.minus+" tree-minus").addClass(this.p.treeIcons.plus+" tree-plus")}})},SortTree:function(b,c,a,e){return this.each(function(){if(this.grid&&this.p.treeGrid){var g,h,f,k=[],i=this,j;g=d(this).jqGrid("getRootNodes");g=d.jgrid.from(g);g.orderBy(b,c,a,e);j=g.select();g=0;for(h=j.length;g<h;g++){f=j[g];k.push(f);d(this).jqGrid("collectChildrenSortTree",k,f,b,c,a,e)}d.each(k,function(o){var n=d.jgrid.getAccessor(this,i.p.localReader.id);d("#"+i.p.id+" tbody tr:eq("+o+")").after(d("tr#"+
|
423
|
+
n,i.grid.bDiv))});k=j=g=null}})},collectChildrenSortTree:function(b,c,a,e,g,h){return this.each(function(){if(this.grid&&this.p.treeGrid){var f,k,i,j;f=d(this).jqGrid("getNodeChildren",c);f=d.jgrid.from(f);f.orderBy(a,e,g,h);j=f.select();f=0;for(k=j.length;f<k;f++){i=j[f];b.push(i);d(this).jqGrid("collectChildrenSortTree",b,i,a,e,g,h)}}})},setTreeRow:function(b,c){var a=false;this.each(function(){if(this.grid&&this.p.treeGrid)a=d(this).jqGrid("setRowData",b,c)});return a},delTreeNode:function(b){return this.each(function(){var c=
|
424
|
+
this.p.localReader.id,a=this.p.treeReader.left_field,e=this.p.treeReader.right_field,g,h,f;if(this.grid&&this.p.treeGrid){var k=this.p._index[b];if(k!==undefined){g=parseInt(this.p.data[k][e],10);h=g-parseInt(this.p.data[k][a],10)+1;k=d(this).jqGrid("getFullTreeNode",this.p.data[k]);if(k.length>0)for(var i=0;i<k.length;i++)d(this).jqGrid("delRowData",k[i][c]);if(this.p.treeGridModel==="nested"){c=d.jgrid.from(this.p.data).greater(a,g,{stype:"integer"}).select();if(c.length)for(f in c)c[f][a]=parseInt(c[f][a],
|
425
|
+
10)-h;c=d.jgrid.from(this.p.data).greater(e,g,{stype:"integer"}).select();if(c.length)for(f in c)c[f][e]=parseInt(c[f][e],10)-h}}}})},addChildNode:function(b,c,a){var e=this[0];if(a){var g=e.p.treeReader.expanded_field,h=e.p.treeReader.leaf_field,f=e.p.treeReader.level_field,k=e.p.treeReader.parent_id_field,i=e.p.treeReader.left_field,j=e.p.treeReader.right_field,o=e.p.treeReader.loaded,n,l,m,r,p;n=0;var s=c,t;if(!b){p=e.p.data.length-1;if(p>=0)for(;p>=0;){n=Math.max(n,parseInt(e.p.data[p][e.p.localReader.id],
|
426
|
+
10));p--}b=n+1}var u=d(e).jqGrid("getInd",c);t=false;if(c===undefined||c===null||c===""){s=c=null;n="last";r=e.p.tree_root_level;p=e.p.data.length+1}else{n="after";l=e.p._index[c];m=e.p.data[l];c=m[e.p.localReader.id];r=parseInt(m[f],10)+1;p=d(e).jqGrid("getFullTreeNode",m);if(p.length){s=p=p[p.length-1][e.p.localReader.id];p=d(e).jqGrid("getInd",s)+1}else p=d(e).jqGrid("getInd",c)+1;if(m[h]){t=true;m[g]=true;d(e.rows[u]).find("span.cell-wrapperleaf").removeClass("cell-wrapperleaf").addClass("cell-wrapper").end().find("div.tree-leaf").removeClass(e.p.treeIcons.leaf+
|
427
|
+
" tree-leaf").addClass(e.p.treeIcons.minus+" tree-minus");e.p.data[l][h]=false;m[o]=true}}l=p+1;a[g]=false;a[o]=true;a[f]=r;a[h]=true;if(e.p.treeGridModel==="adjacency")a[k]=c;if(e.p.treeGridModel==="nested"){var q;if(c!==null){h=parseInt(m[j],10);f=d.jgrid.from(e.p.data);f=f.greaterOrEquals(j,h,{stype:"integer"});f=f.select();if(f.length)for(q in f){f[q][i]=f[q][i]>h?parseInt(f[q][i],10)+2:f[q][i];f[q][j]=f[q][j]>=h?parseInt(f[q][j],10)+2:f[q][j]}a[i]=h;a[j]=h+1}else{h=parseInt(d(e).jqGrid("getCol",
|
428
|
+
j,false,"max"),10);f=d.jgrid.from(e.p.data).greater(i,h,{stype:"integer"}).select();if(f.length)for(q in f)f[q][i]=parseInt(f[q][i],10)+2;f=d.jgrid.from(e.p.data).greater(j,h,{stype:"integer"}).select();if(f.length)for(q in f)f[q][j]=parseInt(f[q][j],10)+2;a[i]=h+1;a[j]=h+2}}if(c===null||d(e).jqGrid("isNodeLoaded",m)||t){d(e).jqGrid("addRowData",b,a,n,s);d(e).jqGrid("setTreeNode",p,l)}m&&!m[g]&&d(e.rows[u]).find("div.treeclick").click()}}})})(jQuery);
|
429
|
+
(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 d=this,c=function(f,g){var e=b(g.xmlGrid.config,f)[0],h=b(g.xmlGrid.data,f)[0],i;if(xmlJsonClass.xml2json&&b.jgrid.parse){e=xmlJsonClass.xml2json(e," ");e=b.jgrid.parse(e);for(var l in e)if(e.hasOwnProperty(l))i=e[l];if(h){h=e.grid.datatype;
|
430
|
+
e.grid.datatype="xmlstring";e.grid.datastr=f;b(d).jqGrid(i).jqGrid("setGridParam",{datatype:h})}else b(d).jqGrid(i)}else alert("xml2json or parse are not present")},j=function(f,g){if(f&&typeof f=="string"){var e=b.jgrid.parse(f),h=e[g.jsonGrid.config];if(e=e[g.jsonGrid.data]){var i=h.datatype;h.datatype="jsonstring";h.datastr=e;b(d).jqGrid(h).jqGrid("setGridParam",{datatype:i})}else b(d).jqGrid(h)}};switch(a.imptype){case "xml":b.ajax(b.extend({url:a.impurl,type:a.mtype,data:a.impData,dataType:"xml",
|
431
|
+
complete:function(f,g){if(g=="success"){c(f.responseXML,a);b.isFunction(a.importComplete)&&a.importComplete(f)}}},a.ajaxOptions));break;case "xmlstring":if(a.impstring&&typeof a.impstring=="string"){var k=b.jgrid.stringToDoc(a.impstring);if(k){c(k,a);b.isFunction(a.importComplete)&&a.importComplete(k);a.impstring=null}k=null}break;case "json":b.ajax(b.extend({url:a.impurl,type:a.mtype,data:a.impData,dataType:"json",complete:function(f,g){if(g=="success"){j(f.responseText,a);b.isFunction(a.importComplete)&&
|
432
|
+
a.importComplete(f)}}},a.ajaxOptions));break;case "jsonstring":if(a.impstring&&typeof a.impstring=="string"){j(a.impstring,a);b.isFunction(a.importComplete)&&a.importComplete(a.impstring);a.impstring=null}}})},jqGridExport:function(a){a=b.extend({exptype:"xmlstring",root:"grid",ident:"\t"},a||{});var d=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,
|
433
|
+
1)}if(c.subGrid){c.colNames.splice(0,1);c.colModel.splice(0,1)}c.knv=null;if(c.treeGrid)for(var j in c.treeReader)if(c.treeReader.hasOwnProperty(j)){c.colNames.splice(c.colNames.length-1);c.colModel.splice(c.colModel.length-1)}switch(a.exptype){case "xmlstring":d="<"+a.root+">"+xmlJsonClass.json2xml(c,a.ident)+"</"+a.root+">";break;case "jsonstring":d="{"+xmlJsonClass.toJson(c,a.root,a.ident,false)+"}";if(c.postData.filters!==undefined){d=d.replace(/filters":"/,'filters":');d=d.replace(/}]}"/,"}]}")}}}});
|
434
|
+
return d},excelExport:function(a){a=b.extend({exptype:"remote",url:null,oper:"oper",tag:"excel",exportOptions:{}},a||{});return this.each(function(){if(this.grid){var d;if(a.exptype=="remote"){d=b.extend({},this.p.postData);d[a.oper]=a.tag;d=jQuery.param(d);d=a.url.indexOf("?")!=-1?a.url+"&"+d:a.url+"?"+d;window.location=d}}})}})})(jQuery);
|
435
|
+
var xmlJsonClass={xml2json:function(a,b){if(a.nodeType===9)a=a.documentElement;var g=this.toJson(this.toObj(this.removeWhite(a)),a.nodeName,"\t");return"{\n"+b+(b?g.replace(/\t/g,b):g.replace(/\t|\n/g,""))+"\n}"},json2xml:function(a,b){var g=function(d,c,i){var h="",k,j;if(d instanceof Array)if(d.length===0)h+=i+"<"+c+">__EMPTY_ARRAY_</"+c+">\n";else{k=0;for(j=d.length;k<j;k+=1){var l=i+g(d[k],c,i+"\t")+"\n";h+=l}}else if(typeof d==="object"){k=false;h+=i+"<"+c;for(j in d)if(d.hasOwnProperty(j))if(j.charAt(0)===
|
436
|
+
"@")h+=" "+j.substr(1)+'="'+d[j].toString()+'"';else k=true;h+=k?">":"/>";if(k){for(j in d)if(d.hasOwnProperty(j))if(j==="#text")h+=d[j];else if(j==="#cdata")h+="<![CDATA["+d[j]+"]]\>";else if(j.charAt(0)!=="@")h+=g(d[j],j,i+"\t");h+=(h.charAt(h.length-1)==="\n"?i:"")+"</"+c+">"}}else h+=typeof d==="function"?i+"<"+c+"><![CDATA["+d+"]]\></"+c+">":d.toString()==='""'||d.toString().length===0?i+"<"+c+">__EMPTY_STRING_</"+c+">":i+"<"+c+">"+d.toString()+"</"+c+">";return h},e="",f;for(f in a)if(a.hasOwnProperty(f))e+=
|
437
|
+
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=
|
438
|
+
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));
|
439
|
+
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: "+
|
440
|
+
a.nodeType);return b},toJson:function(a,b,g,e){if(e===undefined)e=true;var f=b?'"'+b+'"':"",d="\t",c="\n";if(!e)c=d="";if(a==="[]")f+=b?":[]":"[]";else if(a instanceof Array){var i,h,k=[];h=0;for(i=a.length;h<i;h+=1)k[h]=this.toJson(a[h],"",g+d,e);f+=(b?":[":"[")+(k.length>1?c+g+d+k.join(","+c+g+d)+c+g:k.join(""))+"]"}else if(a===null)f+=(b&&":")+"null";else if(typeof a==="object"){i=[];for(h in a)if(a.hasOwnProperty(h))i[i.length]=this.toJson(a[h],h,g+d,e);f+=(b?":{":"{")+(i.length>1?c+g+d+i.join(","+
|
441
|
+
c+g+d)+c+g:i.join(""))+"}"}else f+=typeof a==="string"?(b&&":")+'"'+a.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"':(b&&":")+'"'+a.toString()+'"';return f},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+=
|
442
|
+
"/>"}else if(e.nodeType===3)f+=e.nodeValue;else if(e.nodeType===4)f+="<![CDATA["+e.nodeValue+"]]\>";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);
|
443
|
+
b=b.nextSibling}return a}};
|
444
|
+
function tableToGrid(n,o){jQuery(n).each(function(){if(!this.grid){jQuery(this).width("99%");var a=jQuery(this).width(),d=jQuery("input[type=checkbox]:first",jQuery(this)),b=jQuery("input[type=radio]:first",jQuery(this));d=d.length>0;b=!d&&b.length>0;var l=d||b,c=[],g=[];jQuery("th",jQuery(this)).each(function(){if(c.length===0&&l){c.push({name:"__selection__",index:"__selection__",width:0,hidden:true});g.push("__selection__")}else{c.push({name:jQuery(this).attr("id")||jQuery.trim(jQuery.jgrid.stripHtml(jQuery(this).html())).split(" ").join("_"),
|
445
|
+
index:jQuery(this).attr("id")||jQuery.trim(jQuery.jgrid.stripHtml(jQuery(this).html())).split(" ").join("_"),width:jQuery(this).width()||150});g.push(jQuery(this).html())}});var f=[],h=[],i=[];jQuery("tbody > tr",jQuery(this)).each(function(){var j={},e=0;jQuery("td",jQuery(this)).each(function(){if(e===0&&l){var k=jQuery("input",jQuery(this)),m=k.attr("value");h.push(m||f.length);k.attr("checked")&&i.push(m);j[c[e].name]=k.attr("value")}else j[c[e].name]=jQuery(this).html();e++});e>0&&f.push(j)});
|
446
|
+
jQuery(this).empty();jQuery(this).addClass("scroll");jQuery(this).jqGrid(jQuery.extend({datatype:"local",width:a,colNames:g,colModel:c,multiselect:d},o||{}));for(a=0;a<f.length;a++){b=null;if(h.length>0)if((b=h[a])&&b.replace)b=encodeURIComponent(b).replace(/[.\-%]/g,"_");if(b===null)b=a+1;jQuery(this).jqGrid("addRowData",b,f[a])}for(a=0;a<i.length;a++)jQuery(this).jqGrid("setSelection",i[a])}})};
|
447
|
+
(function(a){if(a.browser.msie&&a.browser.version==8)a.expr[":"].hidden=function(b){return b.offsetWidth===0||b.offsetHeight===0||b.style.display=="none"};a.jgrid._multiselect=false;if(a.ui)if(a.ui.multiselect){if(a.ui.multiselect.prototype._setSelected){var q=a.ui.multiselect.prototype._setSelected;a.ui.multiselect.prototype._setSelected=function(b,g){var c=q.call(this,b,g);if(g&&this.selectedList){var f=this.element;this.selectedList.find("li").each(function(){a(this).data("optionLink")&&a(this).data("optionLink").remove().appendTo(f)})}return c}}if(a.ui.multiselect.prototype.destroy)a.ui.multiselect.prototype.destroy=
|
448
|
+
function(){this.element.show();this.container.remove();a.Widget===undefined?a.widget.prototype.destroy.apply(this,arguments):a.Widget.prototype.destroy.apply(this,arguments)};a.jgrid._multiselect=true}a.jgrid.extend({sortableColumns:function(b){return this.each(function(){function g(){c.p.disableClick=true}var c=this,f=c.p.id;f={tolerance:"pointer",axis:"x",scrollSensitivity:"1",items:">th:not(:has(#jqgh_"+f+"_cb,#jqgh_"+f+"_rn,#jqgh_"+f+"_subgrid),:hidden)",placeholder:{element:function(h){return a(document.createElement(h[0].nodeName)).addClass(h[0].className+
|
449
|
+
" ui-sortable-placeholder ui-state-highlight").removeClass("ui-sortable-helper")[0]},update:function(h,j){j.height(h.currentItem.innerHeight()-parseInt(h.currentItem.css("paddingTop")||0,10)-parseInt(h.currentItem.css("paddingBottom")||0,10));j.width(h.currentItem.innerWidth()-parseInt(h.currentItem.css("paddingLeft")||0,10)-parseInt(h.currentItem.css("paddingRight")||0,10))}},update:function(h,j){var i=a(j.item).parent();i=a(">th",i);var l={},m=c.p.id+"_";a.each(c.p.colModel,function(k){l[this.name]=
|
450
|
+
k});var d=[];i.each(function(){var k=a(">div",this).get(0).id.replace(/^jqgh_/,"").replace(m,"");k in l&&d.push(l[k])});a(c).jqGrid("remapColumns",d,true,true);a.isFunction(c.p.sortable.update)&&c.p.sortable.update(d);setTimeout(function(){c.p.disableClick=false},50)}};if(c.p.sortable.options)a.extend(f,c.p.sortable.options);else if(a.isFunction(c.p.sortable))c.p.sortable={update:c.p.sortable};if(f.start){var e=f.start;f.start=function(h,j){g();e.call(this,h,j)}}else f.start=g;if(c.p.sortable.exclude)f.items+=
|
451
|
+
":not("+c.p.sortable.exclude+")";b.sortable(f).data("sortable").floating=true})},columnChooser:function(b){function g(d,k){if(d)if(typeof d=="string")a.fn[d]&&a.fn[d].apply(k,a.makeArray(arguments).slice(2));else a.isFunction(d)&&d.apply(k,a.makeArray(arguments).slice(2))}var c=this;if(!a("#colchooser_"+c[0].p.id).length){var f=a('<div id="colchooser_'+c[0].p.id+'" style="position:relative;overflow:hidden"><div><select multiple="multiple"></select></div></div>'),e=a("select",f);b=a.extend({width:420,
|
452
|
+
height:240,classname:null,done:function(d){d&&c.jqGrid("remapColumns",d,true)},msel:"multiselect",dlog:"dialog",dlog_opts:function(d){var k={};k[d.bSubmit]=function(){d.apply_perm();d.cleanup(false)};k[d.bCancel]=function(){d.cleanup(true)};return{buttons:k,close:function(){d.cleanup(true)},modal:d.modal?d.modal:false,resizable:d.resizable?d.resizable:true,width:d.width+20}},apply_perm:function(){a("option",e).each(function(){this.selected?c.jqGrid("showCol",h[this.value].name):c.jqGrid("hideCol",
|
453
|
+
h[this.value].name)});var d=[];a("option[selected]",e).each(function(){d.push(parseInt(this.value,10))});a.each(d,function(){delete i[h[parseInt(this,10)].name]});a.each(i,function(){var k=parseInt(this,10);var p=d,o=k;if(o>=0){var n=p.slice(),r=n.splice(o,Math.max(p.length-o,o));if(o>p.length)o=p.length;n[o]=k;d=n.concat(r)}else d=void 0});b.done&&b.done.call(c,d)},cleanup:function(d){g(b.dlog,f,"destroy");g(b.msel,e,"destroy");f.remove();d&&b.done&&b.done.call(c)},msel_opts:{}},a.jgrid.col,b||{});
|
454
|
+
if(a.ui)if(a.ui.multiselect)if(b.msel=="multiselect"){if(!a.jgrid._multiselect){alert("Multiselect plugin loaded after jqGrid. Please load the plugin before the jqGrid!");return}b.msel_opts=a.extend(a.ui.multiselect.defaults,b.msel_opts)}b.caption&&f.attr("title",b.caption);if(b.classname){f.addClass(b.classname);e.addClass(b.classname)}if(b.width){a(">div",f).css({width:b.width,margin:"0 auto"});e.css("width",b.width)}if(b.height){a(">div",f).css("height",b.height);e.css("height",b.height-10)}var h=
|
455
|
+
c.jqGrid("getGridParam","colModel"),j=c.jqGrid("getGridParam","colNames"),i={},l=[];e.empty();a.each(h,function(d){i[this.name]=d;if(this.hidedlg)this.hidden||l.push(d);else e.append("<option value='"+d+"' "+(this.hidden?"":"selected='selected'")+">"+j[d]+"</option>")});var m=a.isFunction(b.dlog_opts)?b.dlog_opts.call(c,b):b.dlog_opts;g(b.dlog,f,m);m=a.isFunction(b.msel_opts)?b.msel_opts.call(c,b):b.msel_opts;g(b.msel,e,m)}},sortableRows:function(b){return this.each(function(){var g=this;if(g.grid)if(!g.p.treeGrid)if(a.fn.sortable){b=
|
456
|
+
a.extend({cursor:"move",axis:"y",items:".jqgrow"},b||{});if(b.start&&a.isFunction(b.start)){b._start_=b.start;delete b.start}else b._start_=false;if(b.update&&a.isFunction(b.update)){b._update_=b.update;delete b.update}else b._update_=false;b.start=function(c,f){a(f.item).css("border-width","0px");a("td",f.item).each(function(j){this.style.width=g.grid.cols[j].style.width});if(g.p.subGrid){var e=a(f.item).attr("id");try{a(g).jqGrid("collapseSubGridRow",e)}catch(h){}}b._start_&&b._start_.apply(this,
|
457
|
+
[c,f])};b.update=function(c,f){a(f.item).css("border-width","");g.p.rownumbers===true&&a("td.jqgrid-rownum",g.rows).each(function(e){a(this).html(e+1)});b._update_&&b._update_.apply(this,[c,f])};a("tbody:first",g).sortable(b);a("tbody:first",g).disableSelection()}})},gridDnD:function(b){return this.each(function(){function g(){var e=a.data(c,"dnd");a("tr.jqgrow:not(.ui-draggable)",c).draggable(a.isFunction(e.drag)?e.drag.call(a(c),e):e.drag)}var c=this;if(c.grid)if(!c.p.treeGrid)if(a.fn.draggable&&
|
458
|
+
a.fn.droppable){a("#jqgrid_dnd").html()===null&&a("body").append("<table id='jqgrid_dnd' class='ui-jqgrid-dnd'></table>");if(typeof b=="string"&&b=="updateDnD"&&c.p.jqgdnd===true)g();else{b=a.extend({drag:function(e){return a.extend({start:function(h,j){if(c.p.subGrid){var i=a(j.helper).attr("id");try{a(c).jqGrid("collapseSubGridRow",i)}catch(l){}}for(i=0;i<a.data(c,"dnd").connectWith.length;i++)a(a.data(c,"dnd").connectWith[i]).jqGrid("getGridParam","reccount")=="0"&&a(a.data(c,"dnd").connectWith[i]).jqGrid("addRowData",
|
459
|
+
"jqg_empty_row",{});j.helper.addClass("ui-state-highlight");a("td",j.helper).each(function(m){this.style.width=c.grid.headers[m].width+"px"});e.onstart&&a.isFunction(e.onstart)&&e.onstart.call(a(c),h,j)},stop:function(h,j){if(j.helper.dropped){var i=a(j.helper).attr("id");a(c).jqGrid("delRowData",i)}for(i=0;i<a.data(c,"dnd").connectWith.length;i++)a(a.data(c,"dnd").connectWith[i]).jqGrid("delRowData","jqg_empty_row");e.onstop&&a.isFunction(e.onstop)&&e.onstop.call(a(c),h,j)}},e.drag_opts||{})},drop:function(e){return a.extend({accept:function(h){if(!a(h).hasClass("jqgrow"))return h;
|
460
|
+
var j=a(h).closest("table.ui-jqgrid-btable");if(j.length>0&&a.data(j[0],"dnd")!==undefined){h=a.data(j[0],"dnd").connectWith;return a.inArray("#"+this.id,h)!=-1?true:false}return h},drop:function(h,j){if(a(j.draggable).hasClass("jqgrow")){var i=a(j.draggable).attr("id");i=j.draggable.parent().parent().jqGrid("getRowData",i);if(!e.dropbyname){var l=0,m={},d,k=a("#"+this.id).jqGrid("getGridParam","colModel");try{for(var p in i){if(i.hasOwnProperty(p)&&k[l]){d=k[l].name;m[d]=i[p]}l++}i=m}catch(o){}}j.helper.dropped=
|
461
|
+
true;if(e.beforedrop&&a.isFunction(e.beforedrop)){d=e.beforedrop.call(this,h,j,i,a("#"+c.id),a(this));if(typeof d!="undefined"&&d!==null&&typeof d=="object")i=d}if(j.helper.dropped){var n;if(e.autoid)if(a.isFunction(e.autoid))n=e.autoid.call(this,i);else{n=Math.ceil(Math.random()*1E3);n=e.autoidprefix+n}a("#"+this.id).jqGrid("addRowData",n,i,e.droppos)}e.ondrop&&a.isFunction(e.ondrop)&&e.ondrop.call(this,h,j,i)}}},e.drop_opts||{})},onstart:null,onstop:null,beforedrop:null,ondrop:null,drop_opts:{activeClass:"ui-state-active",
|
462
|
+
hoverClass:"ui-state-hover"},drag_opts:{revert:"invalid",helper:"clone",cursor:"move",appendTo:"#jqgrid_dnd",zIndex:5E3},dropbyname:false,droppos:"first",autoid:true,autoidprefix:"dnd_"},b||{});if(b.connectWith){b.connectWith=b.connectWith.split(",");b.connectWith=a.map(b.connectWith,function(e){return a.trim(e)});a.data(c,"dnd",b);c.p.reccount!="0"&&!c.p.jqgdnd&&g();c.p.jqgdnd=true;for(var f=0;f<b.connectWith.length;f++)a(b.connectWith[f]).droppable(a.isFunction(b.drop)?b.drop.call(a(c),b):b.drop)}}}})},
|
463
|
+
gridResize:function(b){return this.each(function(){var g=this;if(g.grid&&a.fn.resizable){b=a.extend({},b||{});if(b.alsoResize){b._alsoResize_=b.alsoResize;delete b.alsoResize}else b._alsoResize_=false;if(b.stop&&a.isFunction(b.stop)){b._stop_=b.stop;delete b.stop}else b._stop_=false;b.stop=function(c,f){a(g).jqGrid("setGridParam",{height:a("#gview_"+g.p.id+" .ui-jqgrid-bdiv").height()});a(g).jqGrid("setGridWidth",f.size.width,b.shrinkToFit);b._stop_&&b._stop_.call(g,c,f)};b.alsoResize=b._alsoResize_?
|
464
|
+
eval("("+("{'#gview_"+g.p.id+" .ui-jqgrid-bdiv':true,'"+b._alsoResize_+"':true}")+")"):a(".ui-jqgrid-bdiv","#gview_"+g.p.id);delete b._alsoResize_;a("#gbox_"+g.p.id).resizable(b)}})}})})(jQuery);
|