Fixed logic to properly find RO Tokens in text.

Fixed logic when searching for annotations so that the results can be selected.
This commit is contained in:
Rich 2013-11-27 15:43:53 +00:00
parent eee8ac291f
commit 6ae55e3780
2 changed files with 7 additions and 4 deletions

View File

@ -7178,11 +7178,14 @@ WHILE (LEN(@text) > 0)
IF @index = 0 IF @index = 0
BREAK BREAK
DECLARE @index2 int DECLARE @index2 int
SET @index2 = CHARINDEX('>' , @text) SET @index2 = @index + CHARINDEX('>' , substring(@text,@index,len(@text)))
if @index2 = 0 if @index2 = 0
BREAK BREAK
INSERT INTO @Tokens VALUES (substring(@text, @index,1+@index2-@index)) INSERT INTO @Tokens VALUES (substring(@text, @index,@index2-@index))
if(len(@text) > @index2)
SET @text = RIGHT(@text, (LEN(@text) - @index2)) SET @text = RIGHT(@text, (LEN(@text) - @index2))
else
SET @Text = ''
END END
RETURN RETURN
END END

View File

@ -211,7 +211,7 @@ namespace Volian.Controls.Library
AnnotationDirty = false; AnnotationDirty = false;
if (!_LoadingGrid) if (!_LoadingGrid)
rtxbComment.Focus(); // Set the focus to the comment text rtxbComment.Focus(); // Set the focus to the comment text
if (MyUserInfo.IsReviewer(_CurrentItem.MyDocVersion) && CurrentAnnotation != null && CurrentAnnotation.UserID != MyUserInfo.UserID) if (CurrentAnnotation != null && MyUserInfo.IsReviewer(CurrentAnnotation.MyItem.MyDocVersion ) && CurrentAnnotation.UserID != MyUserInfo.UserID)
{ {
btnRemoveAnnotation.Enabled = false; btnRemoveAnnotation.Enabled = false;
cbGridAnnoType.Enabled = false; cbGridAnnoType.Enabled = false;