TimeTrex/interface/html5/dist/message_box-NoResultBox.bundle.js

1 line
5.9 KiB
JavaScript
Raw Permalink Normal View History

2022-12-13 07:10:06 +01:00
(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["message_box-NoResultBox"],{4938:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.NoResultBox = function( options ) {\n\n\t\tGlobal.addCss( 'global/widgets/message_box/NoResultBox.css' );\n\t\tvar opts = $.extend( {}, $.fn.NoResultBox.defaults, options );\n\t\tvar related_view_controller;\n\t\tvar message = Global.no_result_message;\n\t\tvar iconLabel = '';\n\n\t\tthis.each( function() {\n\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( this ).data() ) : opts;\n\n\t\t\tif ( o.related_view_controller ) {\n\t\t\t\trelated_view_controller = o.related_view_controller;\n\t\t\t}\n\n\t\t\tif ( o.message ) {\n\t\t\t\tmessage = o.message;\n\t\t\t}\n\n\t\t\tif ( o.iconLabel ) {\n\t\t\t\ticonLabel = o.iconLabel;\n\t\t\t} else {\n\t\t\t\ticonLabel = $.i18n._( 'New' );\n\t\t\t}\n\n\t\t\tvar ribbon_button = $( this ).find( '.p-button' );\n\t\t\tvar ribbon_button_div = $( this ).find( '.add-div' );\n\t\t\tvar label = $( this ).find( '.p-button-label' );\n\t\t\tvar icon = $( this ).find( '.icon' );\n\t\t\tvar message_div = $( this ).find( '.message' );\n\n\t\t\tribbon_button_div.css( 'display', 'block' );\n\n\t\t\tif ( o.is_new ) {\n\n\t\t\t\ticon.addClass( 'tticon tticon-add_black_24dp' );\n\t\t\t\tlabel.text( iconLabel );\n\n\t\t\t\tribbon_button.bind( 'click', function() {\n\t\t\t\t\trelated_view_controller.onAddClick();\n\t\t\t\t} );\n\n\t\t\t} else if ( o.is_edit ) {\n\n\t\t\t\ticon.addClass( 'tticon tticon-edit_black_24dp' );\n\t\t\t\tlabel.text( $.i18n._( 'Edit' ) );\n\n\t\t\t\tribbon_button.bind( 'click', function() {\n\t\t\t\t\trelated_view_controller.onEditClick();\n\t\t\t\t} );\n\n\t\t\t} else {\n\n\t\t\t\tribbon_button_div.css( 'display', 'none' );\n\t\t\t}\n\n\t\t\tmessage_div.text( message );\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.NoResultBox.defaults = {};\n\t$.fn.NoResultBox.html_template = `\n\t\t<div class=\"no-result-div\">\n\t\t\t<span class=\"message\"></span>\n\t\t\t<div class=\"add-div\">\n\t\t\t\t<button class=\"tt-button p-button p-component\" type=\"button\">\n\t\t\t\t\t<span class=\"icon\"></span>\n\t\t\t\t\t<span class=\"label p-button-label\"></span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t`;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDkzOC5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7O0FBRUE7QUFDQSx5QkFBeUI7QUFDekI7QUFDQTtBQUNBOztBQUVBOztBQUVBLGdDQUFnQzs7QUFFaEM7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSxNQUFNOztBQUVOLEtBQUs7O0FBRUw7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsTUFBTTs7QUFFTixLQUFLOztBQUVMO0FBQ0E7O0FBRUE7O0FBRUEsSUFBSTs7QUFFSjs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsRUFBRSxHQUFHLE1BQU0iLCJzb3Vy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