2012-03-25 18:35:01 +02:00
|
|
|
(function($) {
|
2012-07-10 15:43:53 +02:00
|
|
|
$.entwine('ss', function($) {
|
|
|
|
$('.TreeDropdownField').entwine({
|
2013-07-10 12:30:55 +02:00
|
|
|
subsiteID: function() {
|
2013-07-11 07:31:59 +02:00
|
|
|
var subsiteSel = $('#CopyContentFromID_SubsiteID select')[0];
|
2013-07-10 12:30:55 +02:00
|
|
|
if(!subsiteSel) return;
|
|
|
|
|
|
|
|
subsiteSel.onchange = (function() {
|
|
|
|
this.createTreeNode(true);
|
|
|
|
this.ajaxGetTree((function(response) {
|
|
|
|
this.newTreeReady(response, true);
|
|
|
|
this.updateTreeLabel();
|
|
|
|
}).bind(this));
|
|
|
|
}).bind(this);
|
|
|
|
return subsiteSel.options[subsiteSel.selectedIndex].value;
|
|
|
|
},
|
2008-12-02 04:50:06 +01:00
|
|
|
|
2012-07-10 15:43:53 +02:00
|
|
|
getRequestParams: function() {
|
2013-07-10 12:30:55 +02:00
|
|
|
var name = this.find(':input:hidden').attr('name'), obj = {};
|
|
|
|
obj[name + '_SubsiteID'] = parseInt(this.subsiteID());
|
2012-07-10 15:43:53 +02:00
|
|
|
return obj;
|
2013-07-10 12:30:55 +02:00
|
|
|
}
|
2012-07-10 15:43:53 +02:00
|
|
|
});
|
|
|
|
});
|
2013-07-11 07:31:59 +02:00
|
|
|
})(jQuery);
|