2012-03-25 18:35:01 +02:00
|
|
|
(function($) {
|
2012-07-10 15:43:53 +02:00
|
|
|
$.entwine('ss', function($) {
|
|
|
|
$('#SubsitesSelect').live('change', function() {
|
|
|
|
window.location.search=$.query.set('SubsiteID', $(this).val());
|
|
|
|
});
|
|
|
|
|
|
|
|
// Subsite tab of Group editor
|
|
|
|
$('#Form_ItemEditForm_AccessAllSubsites').entwine({
|
2012-03-25 18:35:01 +02:00
|
|
|
/**
|
|
|
|
* Constructor: onmatch
|
|
|
|
*/
|
|
|
|
onmatch: function () {
|
2012-07-10 15:43:53 +02:00
|
|
|
this.showHideSubsiteList();
|
|
|
|
|
|
|
|
var ref=this;
|
|
|
|
$('#Form_ItemEditForm_AccessAllSubsites input').change(function() {
|
2012-07-11 15:32:10 +02:00
|
|
|
ref.showHideSubsiteList();
|
|
|
|
});
|
2012-07-10 15:43:53 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
showHideSubsiteList: function () {
|
|
|
|
$('#Form_ItemEditForm_Subsites').parent().parent().css('display', ($('#Form_ItemEditForm_AccessAllSubsites_1').is(':checked') ? 'none':''));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
$('.cms-edit-form').entwine({
|
|
|
|
getChangeTrackerOptions: function() {
|
|
|
|
this.ChangeTrackerOptions.ignoreFieldSelector+=', input[name=IsSubsite]';
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Binding a visibility toggle anchor to a longer list of checkboxes.
|
|
|
|
* Hidden by default, unless either the toggle checkbox, or any of the
|
|
|
|
* actual value checkboxes are selected.
|
|
|
|
*/
|
|
|
|
$('#PageTypeBlacklist').entwine({
|
|
|
|
onmatch: function() {
|
|
|
|
var hasLimits=Boolean($('#PageTypeBlacklist').find('input:checked').length);
|
|
|
|
jQuery('#PageTypeBlacklist').toggle(hasLimits);
|
|
|
|
|
|
|
|
|
|
|
|
//Bind listener
|
|
|
|
$('a#PageTypeBlacklistToggle').click(function(e) {
|
2012-07-11 15:32:10 +02:00
|
|
|
jQuery('#PageTypeBlacklist').toggle();
|
|
|
|
e.stopPropagation();
|
|
|
|
return false;
|
|
|
|
});
|
2012-07-10 15:43:53 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
2012-03-25 18:35:01 +02:00
|
|
|
})(jQuery);
|