aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPContentFilterManager.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-02-19 14:43:01 +0000
committerBibiko <bibiko@eva.mpg.de>2010-02-19 14:43:01 +0000
commit10316c1a2e8448e5dd93a1d10c7e039115864925 (patch)
tree6f7e086731df3be9fdf5f7bd4aa844857f19e4cf /Source/SPContentFilterManager.m
parent69497bca10ddacbee15d48496455a371ea5ab9b0 (diff)
downloadsequelpro-10316c1a2e8448e5dd93a1d10c7e039115864925.tar.gz
sequelpro-10316c1a2e8448e5dd93a1d10c7e039115864925.tar.bz2
sequelpro-10316c1a2e8448e5dd93a1d10c7e039115864925.zip
• added the chance to the user-defined Content Filter Editor to specify whether the leading <field> placeholder should be suppressed or not in order to be able to write a filter like "LENGTH($CURRENT_FIELD)>${}"
Diffstat (limited to 'Source/SPContentFilterManager.m')
-rw-r--r--Source/SPContentFilterManager.m7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/SPContentFilterManager.m b/Source/SPContentFilterManager.m
index 8e3fa5fe..8e79cc8e 100644
--- a/Source/SPContentFilterManager.m
+++ b/Source/SPContentFilterManager.m
@@ -533,6 +533,11 @@
}
+- (IBAction)suppressLeadingFiledPlaceholderWasChanged:(id)sender
+{
+ [contentFilterTextView insertText:@""];
+}
+
/*
* Parse clause and update labels accordingly
*/
@@ -568,7 +573,7 @@
[c flushCachedRegexData];
[c replaceOccurrencesOfRegex:@"(?<!\\\\)\\$CURRENT_FIELD" withString:@"<field>"];
[c flushCachedRegexData];
- [resultingClauseContentLabel setStringValue:[NSString stringWithFormat:@"<field> %@", c]];
+ [resultingClauseContentLabel setStringValue:[NSString stringWithFormat:@"%@%@", ([suppressLeadingFiledPlaceholderCheckbox state] == NSOnState) ? @"" : @"<field> ", c]];
[c release];
}