mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
1 line
756 B
JavaScript
1 line
756 B
JavaScript
!function(){"use strict";var e={311:function(e){e.exports=jQuery}},t={};function r(s){var i=t[s];if(void 0!==i)return i.exports;var o=t[s]={exports:{}};return e[s](o,o.exports,r),o.exports}!function(){var e=r(311);e.entwine("ss",(e=>{e("select.subsitestreedropdownfield-chooser").entwine({onchange(){const t=this.attr("name").replace("_SubsiteID",""),r=e(`#Form_EditForm_${t}`).first();r.setValue(0),r.refresh(),r.trigger("change")}}),e(".TreeDropdownField.SubsitesTreeDropdownField").entwine({getAttributes(){const t=this.attr("id").replace("Form_EditForm_",""),r=e(`#Form_EditForm_${t}_SubsiteID option:selected`).val(),s=this._super();return s.data.urlTree+=`?${t}_SubsiteID=${r}`,s.data.cacheKey=`${s.data.cacheKey.substring(0,19)}_${r}`,s}})}))}()}(); |