Asset Publisher

An error occurred while processing the template.
Java method "com.liferay.portal.model.impl.LayoutBaseImpl.persist()" threw an exception when invoked on com.liferay.portal.model.impl.LayoutImpl object "{mvccVersion=348, uuid=594a6e5b-1d4c-03c1-658e-a5b8399d84b2, plid=55264, groupId=20143, companyId=20116, userId=36923, userName=Kathrin Bunderla-Wonisch, createDate=Mon Feb 12 17:18:10 GMT 2018, modifiedDate=Fri Jun 08 11:39:39 GMT 2018, privateLayout=false, layoutId=306, parentLayoutId=97, name=<?xml version='1.0' encoding='UTF-8'?><root available-locales=\"en_US\" default-locale=\"en_US\"><Name language-id=\"en_US\">AS5601</Name></root>, title=, description=, keywords=, robots=, type=portlet, typeSettings=CUSTOMIZABLE_LAYOUT=false\ncolumn-1=com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_CCr9gZGGHMtp,com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_G7HlNWKVQXjp\ncolumn-1-customizable=false\ncolumn-2-customizable=false\ncolumn-3-customizable=false\ncolumn-4-customizable=false\nlayout-template-id=1-2-1-columns-50-50\nlayoutUpdateable=true\nsitemap-changefreq=daily\nsitemap-include=1\n, hidden=false, friendlyURL=/as5601, iconImageId=0, themeId=classic_WAR_classictheme, colorSchemeId=, css=, priority=36, layoutPrototypeUuid=, layoutPrototypeLinkEnabled=false, sourcePrototypeLayoutUuid=, lastPublishDate=null}"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign VOID = layout.persist()  [in template "20116#20152#34487" at line 121, column 5]
----
1<#function getPageURL url> 
2  <#local shortened = url?keep_before("?")?lower_case> 
3  <#local shortened = shortened?replace("/web/guest/", "/")> 
4  <#local shortened = shortened?replace("/ko/", "/")> 
5  <#local shortened = shortened?replace("/ja/", "/")> 
6  <#local shortened = shortened?replace("/zh/", "/")> 
7  <#local shortened = shortened?replace("/en/", "/")> 
8  <#return shortened> 
9</#function> 
10 
11<#assign 
12productService = serviceLocator.findService("at.dccs.liferay.ams.sb.product.service.ProductLocalService") 
13LayoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") 
14ShopService = serviceLocator.findService("at.dccs.liferay.shop.web.application.ams.ShopService") 
15currentLayout = themeDisplay.getLayout() 
16currentUser = themeDisplay.getUser() 
17pageName = currentLayout.getName(locale) 
18pageUrl = getPageURL(themeDisplay.getURLCurrent()) 
19parentLayout = LayoutLocalService.getLayout(currentLayout.getGroupId(), false, currentLayout.getParentLayoutId()) 
20categoryTitle = parentLayout.getName("en_US") 
21fallbackImageUrl = themeDisplay.getLayout().getGroup().getExpandoBridge().getAttribute("product-fallback-image") 
22IMAGE_SIZE = 1360 
23/> 
24 
25<#if getterUtil.getBoolean(serviceLocator.findService("at.dccs.liferay.image.optimizer.ImageOptimizerService")??)> 
26  <#assign 
27  imageOptimizer = serviceLocator.findService("at.dccs.liferay.image.optimizer.ImageOptimizerService") 
28  /> 
29</#if> 
30 
31<#function getOptimImage url, width> 
32  <#if imageOptimizer??> 
33    <#return imageOptimizer.getResizedImageUrl(url, width)> 
34  </#if> 
35  <#return url> 
36</#function> 
37 
38 
39<#assign product = productService.findProduct(pageName)!'' /> 
40 
41<#if !product?has_content> 
42    <div class="alert alert-danger"> 
43      <strong>${languageUtil.get(locale, "funcBlockTableErr_Msg")}</strong> ${pageName} 
44    </div> 
45<#else> 
46  <#assign 
47      productName = product.getName()?has_content?then(product.getName(), '') 
48      headLine = product.getHeadLine()?has_content?then(product.getHeadLine(), '') 
49      subHeadLine = product.getSubHeadLine()?has_content?then(product.getSubHeadLine(), '') 
50      description = product.getDescription()?has_content?then(product.getDescription(), '') 
51      imageUrl = product.getImageUrl()?has_content?then(product.getImageUrl(), '') 
52      productApplications = product.getProductApplications()?has_content?then(product.getProductApplications(), []) 
53      promotionStatus = product.getPromotionStatus()?has_content?then(product.getPromotionStatus(), '') 
54      productParameters = product.getProductParameters()?has_content?then(product.getProductParameters(), []) 
55 
56      doesProductHasToolsSoftwares = product.getToolsSoftwares()?has_content 
57      toolsSoftwares = doesProductHasToolsSoftwares?then(product.getToolsSoftwares(), []) 
58 
59      doesProductHasFeatures = product.getFeatures()?has_content 
60      features = doesProductHasFeatures?then(product.getFeatures(), []) 
61 
62      doesProductHasBenefits = product.getBenefits()?has_content 
63      benefits = doesProductHasBenefits?then(product.getBenefits(), []) 
64      seotitle = product.getSeoTitle()!'' 
65      seodescription = product.getSeoDescription()!'' 
66      default_locale = themeDisplay.getSiteDefaultLocale() 
67      technicalDocuments = product.filterDocumentsByTypes(false, "Application data", "Software") 
68      dataSheetStatus = product.getDataSheetStatus()!0 
69      dataSheet = product.getDataSheet()!'' 
70  /> 
71 
72  <#switch dataSheetStatus> 
73    <#case 0> 
74      <#assign 
75        isDataSheetAvailable = false 
76        isRequestDatasheet = false 
77      /> 
78      <#break> 
79    <#case 1> 
80      <#if dataSheet?? && dataSheet != ''> 
81        <#assign 
82            isDataSheetAvailable = true 
83            dataSheetUrl = product.getDataSheet().getLiferayUrl() 
84            dataSheetText = languageUtil.get(locale, "prodDetail_DownloadDatasheet") 
85            isRequestDatasheet = false 
86        /> 
87      <#else> 
88        <#assign 
89          isDataSheetAvailable = false 
90          isRequestDatasheet = false 
91        /> 
92      </#if> 
93      <#break> 
94    <#case 2> 
95      <#assign 
96          isDataSheetAvailable = true 
97          externalDataSheetLink = themeDisplay.getLayout().getGroup().getExpandoBridge().getAttribute("product-datasheet-request-link", false) 
98          dataSheetUrl = externalDataSheetLink + "?product=" + product.getName() 
99          dataSheetText = languageUtil.get(locale, "prodDetail_RequestDatasheet") 
100          isRequestDatasheet = true 
101      /> 
102      <#break> 
103    <#default> 
104      <#assign 
105        isDataSheetAvailable = false 
106        isRequestDatasheet = false 
107      /> 
108  </#switch> 
109 
110  <#if product.getProductPageUrl() != pageUrl> 
111    <#assign VOID = productService.setProductPageUrl(pageName, pageUrl)/> 
112  </#if> 
113 
114  <#if product.getCategoryTitle() != categoryTitle> 
115    <#assign VOID = productService.setProductCategoryTitle(pageName, categoryTitle)/> 
116  </#if> 
117 
118  <#if layout.getHTMLTitle("en_US") != seotitle || layout.getDescription("en_US") != seodescription> 
119    <#assign VOID = layout.setTitle(seotitle, default_locale)/> 
120    <#assign VOID = layout.setDescription(seodescription, default_locale)/> 
121    <#assign VOID = layout.persist()/> 
122  </#if> 
123 
124    <div class="product-detail"> 
125      <div class="jumbo jumbo--bg"> 
126        <div class="container"> 
127          <h2 class="jumbo__title">${headLine}</h2> 
128          <p class="jumbo__text">${subHeadLine}</p> 
129          <div class="jumbo-footer"> 
130              <#if isDataSheetAvailable> 
131                  <a class="jumbo-footer__link" target="_blank" href="${dataSheetUrl}"> 
132                      <span class="icon"> 
133                          <#if isRequestDatasheet> 
134                              <svg class="icon-document" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 30 37" width="26px" height="22px"> 
135                                  <path fill="#58656D" d="M29,7.9l-8.1-6.8c-0.1-0.1-0.3-0.2-0.4-0.3l-0.3-0.1H3.1c-0.8,0-1.6,0.3-2.2,0.9C0.3,2.3,0,3.1,0,3.9l0,0v11.3c0.4-1.3,1.2-2.5,2.2-3.3V3.9C2.2,3.4,2.6,3,3.1,3h15.1v9.2h5.5V10h-3.3V3.9l6.9,5.7v24.2c0,0.5-0.4,0.9-0.9,0.9h-6.8V37h6.8c0.8,0,1.6-0.3,2.2-0.9c0.6-0.6,0.9-1.4,0.9-2.2V8.7C29.4,8.4,29.3,8.1,29,7.9z"/> 
136                                  <path fill="#58656D" d="M14.9,26v8.5H2.5V26h1.7h0.1H13h0.1H14.9 M8.7,12.2c-3.8,0-7,3.1-7,7v4.3h-1c-0.4,0-0.7,0.3-0.7,0.7v12.1C0,36.7,0.3,37,0.7,37h16c0.4,0,0.7-0.3,0.7-0.7V24.2c0-0.4-0.3-0.7-0.7-0.7h-1v-4.3C15.6,15.3,12.5,12.2,8.7,12.2L8.7,12.2zM4.3,23.5v-4.3c0-2.4,1.9-4.3,4.3-4.3c2.4,0,4.3,1.9,4.3,4.3v4.3H4.3L4.3,23.5z"/> 
137                                  <path fill="#58656D" d="M10,28.8c0-0.8-0.7-1.5-1.5-1.5S7,28,7,28.8c0,0.4,0.2,0.8,0.4,1.1c0.3,0.3,0.3,0.6,0.3,0.9c0,0.6,0,1.2,0,1.8c0,0.4,0.3,0.7,0.7,0.7c0.4,0,0.7-0.3,0.7-0.7c0-0.6,0-1.2,0-1.8c0-0.4,0.1-0.6,0.3-0.9C9.8,29.6,10,29.2,10,28.8z"/> 
138                              </svg> 
139                          <#else> 
140                              <svg class="icon-document" width="26px" height="22px"> 
141                                  <use xlink:href="#icon-document"></use> 
142                              </svg> 
143                          </#if> 
144                      </span> 
145                      ${dataSheetText} 
146                  </a> 
147              </#if> 
148              <p class="jumbo-footer__link"> 
149                  ${languageUtil.get(locale, "prodDetail_ProductStatus")}: ${promotionStatus} 
150              </p> 
151              <a class="jumbo-footer__link" href="#tab6" data-toggle="tab"> 
152                  ${languageUtil.get(locale, "prodDetail_Availability")}: 
153                  <span id="app-product-availability"> 
154                      <product-availability product-variant-keys="${product.getProductMarketingCodeSAP()?has_content?then(product.getProductMarketingCodeSAP(), '')}" /> 
155                  </span> 
156              </a> 
157          </div> 
158        </div> 
159      </div><!-- jumbo --> 
160      <div class="prod-details"> 
161        <div class="prod-details--nav-bg"> 
162          <div class="container"> 
163            <ul class="prod-details__nav prod-details__nav--product"> 
164                        <#if doesProductHasFeatures || doesProductHasBenefits> 
165                            <li class="prod-details__tab active"> 
166                              <a data-toggle="tab" href="#tab1"> 
167                                ${languageUtil.get(locale, "prodDetail_FeaturesBenefits")} 
168                              </a> 
169                            </li> 
170                        </#if> 
171              <li class="prod-details__tab"> 
172                <a data-toggle="tab" href="#tab2"> 
173                  ${languageUtil.get(locale, "prodDetail_GeneralDescription")} 
174                </a> 
175              </li> 
176              <li class="prod-details__tab"> 
177                <a data-toggle="tab" href="#tab3"> 
178                  ${languageUtil.get(locale, "prodDetail_Applications")} 
179                </a> 
180              </li> 
181			<#if doesProductHasToolsSoftwares> 
182                            <li class="prod-details__tab"> 
183                              <a data-toggle="tab" href="#tab4"> 
184                                ${languageUtil.get(locale, "prodDetail_ToolsSupport")} 
185                              </a> 
186                            </li> 
187      </#if> 
188                        <#if technicalDocuments?has_content> 
189		                <li class="prod-details__tab"> 
190                      <a data-toggle="tab" href="#tab5"> 
191                        ${languageUtil.get(locale, "prodDetail_TechnicalDocuments")} 
192                      </a> 
193                    </li> 
194                        </#if> 
195              <li class="prod-details__tab"> 
196                <a data-toggle="tab" href="#tab6"> 
197                  ${languageUtil.get(locale, "prodDetail_ShopNow")} 
198                </a> 
199              </li> 
200            </ul> 
201          </div> 
202        </div><!-- prod-details--nav-bg --> 
203        <div class="container"> 
204          <div class="tab-content prod-details__content"> 
205            <div id="tab1" class="tab-pane prod-details__tab-pane fade in active"> 
206              <div class="row"> 
207                <div class="col-md-6"> 
208                                <#if doesProductHasFeatures> 
209                                    <h3 class="prod-details--title">${languageUtil.get(locale, "prodDetail_Features")}</h3> 
210                                    <ul class="prod-details__ul-list"> 
211                                        <#list features as feature> 
212                                          <li>${feature}</li> 
213                                        </#list> 
214                                    </ul> 
215                                </#if> 
216                                <#if doesProductHasBenefits> 
217                                    <h3 class="prod-details--title">${languageUtil.get(locale, "prodDetail_Benefits")}</h3> 
218                                    <ul class="prod-details__ul-list"> 
219                                      <#list benefits as benefit> 
220                                        <li>${benefit}</li> 
221                                      </#list> 
222                                    </ul> 
223                                </#if> 
224                  <h3 class="prod-details--title">${languageUtil.get(locale, "prodDetail_ProductParameters")}</h3> 
225                  <table class="table table-facts"> 
226                    <tbody> 
227                                        <#if productParameters?has_content> 
228                                            <#list productParameters as parameter> 
229                                              <#assign unit = parameter.getUnit()?has_content?then("[" + parameter.getUnit() + "]", "")/> 
230                                                <tr> 
231                                                  <th scope="row">${parameter.getName()} ${unit}</th> 
232                                                  <td>${parameter.getValue()}</td> 
233                                                </tr> 
234                                            </#list> 
235                                        </#if> 
236                    </tbody> 
237                  </table> 
238                </div> 
239                <div class="col-md-6"> 
240                                <#if imageUrl?has_content> 
241                                  <img class="img-responsive" src="${getOptimImage(imageUrl, IMAGE_SIZE)}"/> 
242                                <#else> 
243                                  <img class="img-responsive" src="${getOptimImage(fallbackImageUrl, IMAGE_SIZE)}"/> 
244                                </#if> 
245                </div> 
246              </div> 
247            </div> 
248            <div id="tab2" class="tab-pane prod-details__tab-pane fade"> 
249              <div class="row"> 
250                <div class="col-md-6"> 
251                                <#if description?has_content> 
252                                  <h3 class="prod-details--title"> 
253                                    ${languageUtil.get(locale, "prodDetail_GeneralDescription")} 
254                                  </h3> 
255                                  <p>${description}</p> 
256                                </#if> 
257                </div> 
258                <div class="col-md-6"> 
259                                <#if imageUrl?has_content> 
260                                  <img class="img-responsive" src="${getOptimImage(imageUrl, IMAGE_SIZE)}"/> 
261                                <#else> 
262                                  <img class="img-responsive" src="${getOptimImage(fallbackImageUrl, IMAGE_SIZE)}"/> 
263                                </#if> 
264                </div> 
265              </div> 
266            </div> 
267            <div id="tab3" class="tab-pane prod-details__tab-pane fade"> 
268              <div class="row"> 
269                <div class="col-md-6"> 
270                              <#if productApplications?has_content> 
271                                <h3 class="prod-details--title">${languageUtil.get(locale, "prodDetail_ApplicationsText")}</h3> 
272                                <ul class="prod-details__ul-list"> 
273                                    <#list productApplications as applicationDesc> 
274                                      <li>${applicationDesc.getAppName()}</li> 
275                                    </#list> 
276                                </ul> 
277                              </#if> 
278                </div> 
279                <div class="col-md-6"> 
280                                <#if imageUrl?has_content> 
281                                  <img class="img-responsive" src="${getOptimImage(imageUrl, IMAGE_SIZE)}"/> 
282                                <#else> 
283                                  <img class="img-responsive" src="${getOptimImage(fallbackImageUrl, IMAGE_SIZE)}"/> 
284                                </#if> 
285                </div> 
286              </div> 
287            </div> 
288                    <#if doesProductHasToolsSoftwares> 
289                        <div id="tab4" class="tab-pane prod-details__tab-pane fade"> 
290                          <div class="row"> 
291                            <div class="col-md-12"> 
292                              <h3 class="prod-details--title">${languageUtil.get(locale, "prodDetail_Tools")}</h3> 
293                              <table class="table"> 
294                                <thead> 
295                                <tr> 
296                                  <th>${languageUtil.get(locale, "prodDetail_Title")}</th> 
297                                  <th>${languageUtil.get(locale, "prodDetail_Category")}</th> 
298                                  <th>${languageUtil.get(locale, "prodDetail_Headline")}</th> 
299                                  <th>${languageUtil.get(locale, "prodDetail_Buy")}</th> 
300                                </tr> 
301                                </thead> 
302                                <tbody> 
303                                            <#list toolsSoftwares as ts> 
304                                            <#--  This is requested in word doc sepcification 1.4_productpart  --> 
305                                                <#if ts.getType() == "Application Board" || ts.getType() == "Accessories" || ts.getType() == "Tools"> 
306                                                  <#assign tsUrl = ts.getPageUrl()?has_content?then(ts.getPageUrl(), '#') /> 
307                                                    <tr> 
308                                                      <td><a href="${tsUrl}">${ts.getName()}</a></td> 
309                                                      <td>${ts.getType()}</td> 
310                                                      <td>${ts.getHeadLine()}</td> 
311                                                      <td> 
312                                                        <a data-tab-destination="tab6" href=""> 
313                                                          <svg class="icon-cart" width="18px" height="21px"> 
314                                                            <use xlink:href="#icon-cart"></use> 
315                                                          </svg> 
316                                                        </a> 
317                                                      </td> 
318                                                    </tr> 
319                                                </#if> 
320                                            </#list> 
321                                </tbody> 
322                              </table> 
323                                    <#assign resourceDocuments = product.filterDocumentsByTypes(true, "Application data", "Software")/> 
324                                    <#if resourceDocuments?has_content> 
325                                        <h3 class="prod-details--title">${languageUtil.get(locale, "prodDetail_Resources")}</h3> 
326                                        <table class="table"> 
327                                          <thead> 
328                                          <tr> 
329                                            <th>${languageUtil.get(locale, "prodDetail_Name")}</th> 
330                                            <th>${languageUtil.get(locale, "prodDetail_Type")}</th> 
331                                            <th>${languageUtil.get(locale, "prodDetail_Description")}</th> 
332                                            <th>${languageUtil.get(locale, "prodDetail_Language")}</th> 
333                                          </tr> 
334                                          </thead> 
335                                          <tbody> 
336                                          <#--  This is requested in word doc sepcification 1.4_productpart  --> 
337                                                <#list resourceDocuments as doc> 
338                                                    <tr> 
339                                                      <td><a href="${doc.getLiferayUrl()}">${doc.getName()}</a></td> 
340                                                      <td>${doc.getType()}</td> 
341                                                      <td>${doc.getDescription()}</td> 
342                                                      <td>${doc.getDocLanguage()}</td> 
343                                                    </tr> 
344                                                </#list> 
345                                          </tbody> 
346                                        </table> 
347                                    </#if> 
348                            </div> 
349                          </div> 
350                        </div> 
351                    </#if> 
352                    <#if technicalDocuments?has_content> 
353                      <div id="tab5" class="tab-pane prod-details__tab-pane fade"> 
354                        <div class="row"> 
355                          <div class="col-md-12"> 
356                            <h3 class="prod-details--title">${languageUtil.get(locale, "prodDetail_TechnicalDocuments")}</h3> 
357                            <div class="table-autoscroll-wrapper"> 
358                              <table class="table table--technical-documents"> 
359                                <thead> 
360                                <tr> 
361                                  <th>${languageUtil.get(locale, "prodDetail_Name")}</th> 
362                                  <th>${languageUtil.get(locale, "prodDetail_Type")}</th> 
363                                  <th>${languageUtil.get(locale, "prodDetail_Description")}</th> 
364                                  <th>${languageUtil.get(locale, "prodDetail_Version")}</th> 
365                                  <th>${languageUtil.get(locale, "prodDetail_Language")}</th> 
366                                </tr> 
367                                </thead> 
368                                <tbody> 
369                                           <#list technicalDocuments as doc> 
370                                           <tr> 
371                                             <td><a href="${doc.getLiferayUrl()}">${doc.getName()}</a></td> 
372                                             <td>${doc.getType()}</td> 
373                                             <td>${doc.getDescription()}</td> 
374                                             <td>${doc.getDocVersion()}</td> 
375                                             <td>${doc.getDocLanguage()}</td> 
376                                           </tr> 
377                                           </#list> 
378 
379                                </tbody> 
380                              </table> 
381                            </div> 
382                          </div> 
383                        </div> 
384                      </div> 
385                    </#if> 
386            <div id="tab6" class="tab-pane prod-details__tab-pane fade" data-tab="shop-now"> 
387              <div id="app-product-shop-now"> 
388                <product-shop-now product-name="${productName}" 
389                                  product-title="${headLine}" 
390                                  product-variant-keys="${product.getProductMarketingCodeSAP()?has_content?then(product.getProductMarketingCodeSAP(), '')}" 
391                                  image-src="${getOptimImage(imageUrl, IMAGE_SIZE)}" 
392                                  fallback-image-src="${getOptimImage(fallbackImageUrl, IMAGE_SIZE)}" 
393                                  :max-sample-amount="${ShopService.getShoppingLimit(currentUser).getMaxPrice()}" 
394                                  :max-sample-quantity="${ShopService.getShoppingLimit(currentUser).getMaxAmount()}" 
395                /> 
396              </div> 
397            </div> 
398            <div class="prod-details__footer"> 
399              <p>${headLine}</p> 
400              <span class="fill-empty-space"></span> 
401              <div class="prod-group"> 
402                            <#if !permissionChecker.getUser().isDefaultUser()> 
403                                <span id="app-favorite-product"> 
404                                    <favorite-button product-name="${productName}"/> 
405                                </span> 
406                            </#if> 
407                <a class="button button--primary" href="#tab/shop-now"> 
408                  ${languageUtil.get(locale, "prodDetail_RequestFreeSample")} 
409                </a> 
410                <a class="button button--primary" href="#tab/shop-now"> 
411                  ${languageUtil.get(locale, "prodDetail_ShopNow")} 
412                </a> 
413              </div> 
414            </div> 
415          </div> 
416        </div><!-- container --> 
417      </div> 
418    </div><!-- product-detail --> 
419</#if> 
420 
421<script> 
422  // Get the modal 
423  $(document).ready(function () { 
424    function ModalDialog() { 
425      var modal = '<div id="imgModal" class="modal img-modal"><span class="close">&times;</span><div class="modal-content"><img class="img-responsive"><div class="caption"></div></div></div>'; 
426      var pageY = null; 
427 
428      $("body").append(modal); 
429      var modalID = "#imgModal"; 
430      var modalJQ = $(modalID); 
431      var caption = $(modalID + " .caption"); 
432      var img = $(modalID + " img"); 
433 
434      $("span.close").on("click", function () { 
435        $("body").removeClass("modal-active"); 
436        modalJQ.css("display", "none"); 
437        caption.text(); 
438        img.attr("src", ""); 
439        window.scrollTo(0, pageY); 
440      }); 
441 
442      this.openDialog = function (e, page_Y) { 
443        pageY = page_Y; 
444        $("body").addClass("modal-active"); 
445        caption.text(e.target.alt); 
446        img.attr("src", e.target.currentSrc); 
447        modalJQ.css("display", "flex"); 
448
449
450 
451    var instance = null; 
452 
453    openImgModal = function (e) { 
454      if (!instance) { 
455        instance = new ModalDialog(); 
456
457      instance.openDialog(e, e.pageY - e.clientY); 
458    }; 
459 
460    switchTab(); 
461  }); 
462 
463  $("a[data-tab-destination]").on('click', function (event) { 
464    event.preventDefault(); 
465    $("a[href$='#" + $(this).attr('data-tab-destination') + "']").click(); 
466  }); 
467 
468  function switchTab() { 
469    if (location.hash.startsWith('#tab/')) { 
470      var tabId = location.hash.replace('#tab/', ''); 
471      var $tab = $('div#' + tabId); 
472      if (!$tab.length) { 
473        $tab = $('div[data-tab="' + tabId + '"]'); 
474
475 
476      if ($tab.length) { 
477        var $anchor = $('a[data-toggle="tab"][href="#' + $tab.attr('id') + '"]'); 
478        if ($anchor.length) { 
479          $anchor.click(); 
480          window.location.hash = ""; 
481
482
483
484
485 
486  window.addEventListener('hashchange', switchTab, false); 
487 
488 
489  if (!String.prototype.startsWith) { 
490    String.prototype.startsWith = function(searchString, position) { 
491      position = position || 0; 
492      return this.indexOf(searchString, position) === position; 
493    }; 
494
495</script> 

Asset Publisher

Related Products