Completed
Last Updated: 24 Apr 2014 13:02 by ADMIN
ADMIN
Misho
Created on: 18 Apr 2014 12:40
Category: Editor
Type: Feature Request
1
FIX: 'Accept All' and 'Reject All' track changes buttons stay enabled if CanAcceptTrackChanges="false"
'Accept All' and 'Reject All' track changes buttons stay enabled if CanAcceptTrackChanges="false". At the same time Accept and Reject buttons are properly disabled.

The behavior is observed both with ToolbarMode set to "Default" and to "Ribbonbar".

A temporarily workaround for ToolbarMode='Default' is:


		 <telerik:RadEditor ID="theEditor" EnableTrackChanges="true" runat="server"
			   OnClientLoad="OnClientLoad" OnClientSelectionChange="OnClientSelectionChange" >
			 <Tools>
				 <telerik:EditorToolGroup>
					  <telerik:EditorTool Name="AcceptTrackChange" Text="Accept" />
			<telerik:EditorTool Name="RejectTrackChange" Text="Reject" />
			<telerik:EditorTool Name="AcceptAllTrackChanges" Text="Accept All" />
			<telerik:EditorTool Name="RejectAllTrackChanges" Text="Reject All" />
			<telerik:EditorTool Name="EnableTrackChangesOverride" Text="Enable Track Changes Override" />
				 </telerik:EditorToolGroup>
			 </Tools>
			   <TrackChangesSettings CanAcceptTrackChanges="false">
			   </TrackChangesSettings>
			 <Content>
				 <strong title="Formatted by RadEditorUser on Tuesday, May 08, 2012 5:59:11 PM" class="reFormat reU0" author="RadEditorUser" timestamp="1336489151795" browsercommand="Bold">RadEditor</strong>
			 </Content>
			 </telerik:RadEditor>
		<script type="text/javascript">
			function OnClientLoad(editor, args) {
				if (!editor.get_canAcceptTrackChanges()) {
					editor.get_toolAdapter().getToolByName("RejectAllTrackChanges").set_enabled(false);
					editor.get_toolAdapter().getToolByName("AcceptAllTrackChanges").set_enabled(false);
				}
			}
			function OnClientSelectionChange(editor, args) {
 
				if (!editor.get_canAcceptTrackChanges()) {
 
					setTimeout(function () {
 
						editor.get_toolAdapter().getToolByName("RejectAllTrackChanges").set_enabled(false);
						editor.get_toolAdapter().getToolByName("AcceptAllTrackChanges").set_enabled(false);
					}, 0);
				}
			}
		</script>

A workaround for ToolbarMode='Ribbonbar' is setting the following style:
  .rrbDisabled, .AcceptTrackChange, .RejectTrackChange
	    {
            opacity: .45;
	    }
1 comment
ADMIN
Misho
Posted on: 24 Apr 2014 13:02
The issue has been resolved and the fix will be available in Q2 2014 official release.