TimeTrex/interface/html5/dist/awesomebox-ADropDown.bundle.js

1 line
260 KiB
JavaScript
Raw Permalink Normal View History

2022-12-13 07:10:06 +01:00
(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["awesomebox-ADropDown"],{3234:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.ADropDown = function( options ) {\n\t\tvar opts = $.extend( {}, $.fn.ADropDown.defaults, options );\n\n\t\tvar unselect_grid = null;\n\n\t\tvar select_grid = null;\n\n\t\tvar total_display_span = null;\n\n\t\tvar static_source_data = null; //Always use this to help to set Select data\n\n\t\tvar id = null;\n\n\t\tvar key = 'id';\n\n\t\tvar parent_a_combo_box = null;\n\n\t\tvar a_dropdown_this = this;\n\n\t\tvar unselect_grid_header_array = [];\n\n\t\tvar select_grid_header_array = [];\n\n\t\tvar show_search_inputs = true;\n\n\t\tvar local_search_mode = false;\n\n\t\tvar local_search_optional_filter = [];\n\n\t\tvar unselect_grid_search_map = null;\n\n\t\tvar select_grid_search_map = null;\n\n\t\tvar unselect_grid_sort_map = null;\n\n\t\tvar select_grid_sort_map = null;\n\n\t\tvar select_item = null;\n\n\t\tvar tree_mode = false;\n\n\t\tvar on_tree_grid_row_select = false; //#2566 - added select row callback so that trees can be used for edit-view navigation\n\n\t\tvar unselect_grid_last_row = '';\n\n\t\tvar select_grid_last_row = '';\n\n\t\tvar allow_multiple_selection = true;\n\n\t\tvar allow_drag_to_order = false;\n\n\t\tvar pager_data = null;\n\n\t\tvar paging_widget = null;\n\n\t\tvar real_selected_items = null; //Set this after search in select grid;\n\n\t\tvar start;\n\n\t\tvar last;\n\n\t\tvar next;\n\n\t\tvar end;\n\n\t\tvar paging_selector;\n\n\t\tvar left_buttons_div;\n\n\t\tvar right_buttons_div;\n\n\t\tvar left_buttons_enable;\n\n\t\tvar right_buttons_enable;\n\n\t\tvar field;\n\n\t\tvar error_tip_box;\n\n\t\tvar error_string = '';\n\n\t\tvar default_height = 150;\n\n\t\tvar unselect_grid_no_result_box = null;\n\n\t\tvar select_grid_no_result_box = null;\n\n\t\tvar box_width;\n\n\t\tvar focus_in_select_grid = false;\n\n\t\tvar auto_sort = false;\n\n\t\tvar isChanged = false;\n\n\t\tvar api = null; //Pass from owner\n\n\t\tvar column_editor = null;\n\n\t\tvar column_option_key = null;\n\n\t\tvar display_column_settings = true;\n\n\t\tvar quick_search_timer;\n\n\t\tvar quick_search_typed_keys = '';\n\n\t\tvar quick_search_dic = {};\n\n\t\tvar max_height = false;\n\t\tvar static_height = false;\n\n\t\tvar resize_grids = false;\n\n\t\t//Select all records in target grid\n\t\tvar selectAllInGrid = function( target, deSelect ) {\n\t\t\ttarget.resetSelection();\n\t\t\tif ( !deSelect ) {\n\t\t\t\tvar source_data = target.getGridParam( 'data' );\n\t\t\t\tvar len = source_data.length;\n\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\tvar item = source_data[i];\n\t\t\t\t\tif ( item.hidden ) {\n continue;\n }\n\t\t\t\t\tif ( Global.isSet( item.id ) ) {\n\t\t\t\t\t\ttarget.grid.jqGrid( 'setSelection', item.id, false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.grid.jqGrid( 'setSelection', i + 1, false );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\ttarget.grid.parents( '.cbox-header' ).prop( 'checked', true );\n\t\t\t}\n\t\t};\n\n\t\tGlobal.addCss( 'global/widgets/awesomebox/ADropDown.css' );\n\n\t\tthis.isLocalSearchMode = function() {\n return local_search_mode;\n };\n\n\t\tthis.setLocalSearchMode = function( value ) {\n local_search_mode = value;\n };\n\n\t\tthis.isChanged = function() {\n\t\t\treturn isChanged;\n\t\t};\n\n\t\tthis.setIsChanged = function( val ) {\n\t\t\tisChanged = val;\n\t\t};\n\n\t\tthis.unSelectAll = function( target ) {\n\t\t\tselectAllInGrid( target, true );\n\t\t};\n\n\t\tthis.getFocusInSeletGrid = function() {\n\t\t\treturn focus_in_select_grid;\n\t\t};\n\n\t\tthis.selectAll = function() {\n\n\t\t\tif ( focus_in_select_grid ) {\n\t\t\t\tselectAllInGrid( select_grid );\n\t\t\t} else {\n\t\t\t\tselectAllInGrid( unselect_grid );\n\t\t\t}\n\n\t\t};\n\n\t\tthis.gridScrollTop = function() {\n\n\t\t\tunsel