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

1 line
3.9 KiB
JavaScript
Raw Permalink Normal View History

2022-12-13 07:10:06 +01:00
(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["message_box-NoHierarchyBox"],{9110:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.NoHierarchyBox = function( options ) {\n\t\tvar opts = $.extend( {}, $.fn.NoHierarchyBox.defaults, options );\n\t\tvar field;\n\t\tvar related_view_controller;\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\tvar label = $( this ).find( '.p-button-label' );\n\t\t\tvar icon = $( this ).find( '.icon' );\n\t\t\tvar message = $( this ).find( '.message' );\n\n\t\t\tvar ribbon_button = $( this ).find( '.p-button' );\n\n\t\t\tmessage.text( Global.no_hierarchy_message );\n\t\t\ticon.addClass( 'tticon tticon-north_east_black_24dp' );\n\t\t\tlabel.html( $.i18n._( 'Hierarchy' ) );\n\n\t\t\tvar len = related_view_controller.context_menu_array.length;\n\n\t\t\tif ( !PermissionManager.checkTopLevelPermission( 'HierarchyControl' ) ) {\n\t\t\t\tribbon_button.addClass( 'disable-image' );\n\t\t\t}\n\n\t\t\tribbon_button.bind( 'click', function() {\n\n\t\t\t\tif ( ribbon_button.hasClass( 'disable-image' ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tMenuManager.goToView( 'HierarchyControl' );\n\t\t\t} );\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.NoHierarchyBox.defaults = {};\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTExMC5qcy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