Skip to content

Commit 41e3dcf

Browse files
author
Blair McKenzie
committed
UNSWBOX-62
1 parent 3e25340 commit 41e3dcf

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

packages/types/csContentType.cfc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,11 @@
595595
</cfcase>
596596

597597
<cfcase value="text">
598-
<cfset stResult[field] = replace(arguments.stObject[property],chr(11)," ","ALL") />
598+
<cfif structkeyexists(application.stCOAPI[arguments.stObject.typename].stProps[property].metadata, "ftRichtextConfig")>
599+
<cfset stResult[field] = rereplace(replace(arguments.stObject[property],chr(11)," ","ALL"), "<[^>]+>", " ", "ALL") />
600+
<cfelse>
601+
<cfset stResult[field] = replace(arguments.stObject[property],chr(11)," ","ALL") />
602+
</cfif>
599603
</cfcase>
600604
<cfcase value="text-array">
601605
<cfif isSimpleValue(arguments.stObject[property])>

webskin/types/webtopOverviewTabCloudSearch.cfm

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,50 @@
22
<!--- @@displayname: CloudSearch --->
33

44
<cfimport taglib="/farcry/core/tags/formtools" prefix="ft" />
5+
<cfimport taglib="/farcry/core/tags/webskin" prefix="skin" />
6+
7+
<skin:loadJS id="fc-jquery" />
8+
<skin:loadJS id="formatjson" />
9+
<skin:htmlHead><cfoutput>
10+
<style>
11+
##message-log td, ##message-log th {
12+
padding: 5px;
13+
}
14+
##message-log .this-item td {
15+
background-color: ##dff0d8;
16+
}
17+
##message-log .related-item td {
18+
background-color: ##fcf8e3;
19+
}
20+
.formatjson .key {
21+
color:##a020f0;
22+
}
23+
.formatjson .number {
24+
color:##ff0000;
25+
}
26+
.formatjson .string {
27+
color:##000000;
28+
}
29+
.formatjson .boolean {
30+
color:##ffa500;
31+
}
32+
.formatjson .null {
33+
color:##0000ff;
34+
}
35+
</style>
36+
</cfoutput></skin:htmlHead>
37+
38+
<cfset stDoc = application.fapi.getContentType("csContentType").getCloudsearchDocument(stObject=stObj) />
39+
<cfset jsonOut = application.fapi.formatJSON(serializeJSON(stDoc)) />
40+
<ft:field label="Document"><cfoutput><pre class="formatjson">#jsonOut#</pre></cfoutput></ft:field>
541

642
<cfset stResult = application.fc.lib.cloudsearch.search(typename=stObj.typename,conditions=[{ "property"="objectid", "term"=stObj.objectid }]) />
743
<cfoutput><h2>Object ID Search</h2></cfoutput>
844
<ft:field label="Query"><cfoutput><pre>#stResult.rawQuery#</pre></cfoutput></ft:field>
945
<ft:field label="Filter"><cfoutput><pre>#stResult.rawFilter#</pre></cfoutput></ft:field>
1046
<ft:field label="Records found"><cfoutput>#stResult.items.recordcount#</cfoutput></ft:field>
1147

12-
<cfset stResult = application.fc.lib.cloudsearch.search(conditions=[{ "text"=stObj.label }]) />
48+
<cfset stResult = application.fc.lib.cloudsearch.search(rawQuery=stObj.label) />
1349
<cfoutput><h2>Label Search</h2></cfoutput>
1450
<ft:field label="Query"><cfoutput><pre>#stResult.rawQuery#</pre></cfoutput></ft:field>
1551
<ft:field label="Filter"><cfoutput><pre>#stResult.rawFilter#</pre></cfoutput></ft:field>

0 commit comments

Comments
 (0)