You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
1.1 KiB
1 line
1.1 KiB
window.BackendServices=window.BackendServices||{},function(e){"use strict";var a,n=new ServicesHelper,i=new CategoriesHelper;e.initialize=function(e){e=e||!0,GlobalVariables.categories.forEach(function(e){$("#service-category").append(new Option(e.name,e.id))}),$("#service-category").append(new Option("- "+EALang.no_category+" -",null)).val("null"),(a=n).resetForm(),a.filter(""),a.bindEventHandlers(),e&&$('a[data-toggle="tab"]').on("shown.bs.tab",function(){a&&a.unbindEventHandlers(),"#services"===$(this).attr("href")?a=n:"#categories"===$(this).attr("href")&&(a=i),a.resetForm(),a.filter(""),a.bindEventHandlers(),$(".filter-key").val(""),Backend.placeFooterToBottom()})},e.updateAvailableCategories=function(){var e=GlobalVariables.baseUrl+"/index.php/backend_api/ajax_filter_service_categories",a={csrfToken:GlobalVariables.csrfToken,key:""};$.post(e,a).done(function(e){GlobalVariables.categories=e;var a=$("#service-category");a.empty(),e.forEach(function(e){a.append(new Option(e.name,e.id))}),a.append(new Option("- "+EALang.no_category+" -",null)).val("null")})}}(window.BackendServices); |