Skip to content

Commit be521e9

Browse files
committed
more indentation fixes. some were not detected in the sweep yesterday.
git-svn-id: https://share-extras.googlecode.com/svn/trunk/Audit Dashlet@1231 a3f5c567-fd0f-3a89-9b71-a290c5a5f590
1 parent b5d1dd8 commit be521e9

File tree

7 files changed

+518
-520
lines changed

7 files changed

+518
-520
lines changed

README.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ of the dashboard and drag the dashlet into one of the columns from the list of d
6161
The number of data rows (audit events) displayed per page is configurable by the 'Entries per page' parameter.
6262

6363
Additional server side filters are configurable :
64-
UI Name Description Audit API corresponding parameter
65-
------------------------------------------------------------------------------------------------------------------------------
64+
UI Name Description Audit API corresponding parameter
65+
--------------------------------------------------------------------------------------------------------------------------------
6666
- value filter filter on the audit value (exact match, optional) 'value'
6767
- limit maximum number of audit entries retrieved (optional) 'limit' (default 100)
6868
- Additional Query params other possible query parameters (optional) from/to time, from/to id, user
@@ -88,23 +88,22 @@ of the dashboard and drag the dashlet into one of the columns from the list of d
8888
-values:pro
8989

9090
- mutliline matches are enabled, ^ and $ will match beginning of lines for audit values,
91-
useful since there can be more than one line per audit entry
91+
useful since there can be more than one line per audit entry
9292

93-
- query can match anywhere in the field by default. queries can be any valid javascript regular expression.
94-
examples :
93+
- query can match anywhere in the field by default. queries can be any valid javascript regular expression. examples :
9594
^romain
9695
values:r.m...$
9796
id:\d\d8
9897
-time:21
9998

100-
The search box will turn green or red if the regex is valid or invalid, respectively
101-
query can be restricted to the beginning by using ^romain (standard regex) for example.
99+
The search box will turn green or red if the regex is valid or invalid, respectively.
100+
The query can be restricted to the beginning by using ^romain (standard regex), for example.
102101
See https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/regexp for more details.
103102

104103
Each match of the regex in the audit entry will be highlighted. Deferred submatches are also supported for highlighting.
105104

106105
- to search for a colon (:), use the field prefix, eg; field:.+:.+ or values:[^:]+: etc... otherwise the colon will be interpreted
107-
as a field identifier
106+
as a field identifier
108107

109108
- noderefs in the audit values will be detected, and "enhanced" with a link to the docdetails page of that noderef
110109

build.xml

Lines changed: 449 additions & 450 deletions
Large diffs are not rendered by default.

config/alfresco/site-webscripts/org/sharextras/components/dashlets/audit-application-data.get.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function main()
2424
var sortOrder = "&forward=" + false; // most recent first
2525

2626
var uri = "/api/audit/query/"+stringUtils.urlEncode(application)+"?verbose=true"
27-
+ optionalAdditionalQueryParams + valueFilterQuery + maxEntryCount + sortOrder;
27+
+ optionalAdditionalQueryParams + valueFilterQuery + maxEntryCount + sortOrder;
2828

2929
var connector = remote.connect("alfresco");
3030
var result = connector.get(uri);

config/alfresco/site-webscripts/org/sharextras/components/dashlets/audit-application.get.html.ftl

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,32 @@
33
<script type="text/javascript">//<![CDATA[
44
new Extras.dashlet.AuditApplication("${el}").setOptions(
55
{
6-
"componentId": "${instance.object.id}",
7-
"application": "${args.application!''}",
8-
"valueFilter": "${args.valueFilter!''}",
9-
"limit": "${args.limit!''}",
10-
"rowsPerPage" : "${args.rowsPerPage!'10'}",
11-
"additionalQueryParams" : "${args.additionalQueryParams!''}",
12-
"show_id_column" : "${args.show_id_column!'show'}",
13-
"show_user_column" : "${args.show_user_column!'show'}",
14-
"show_time_column" : "${args.show_time_column!'show'}",
15-
"show_values_column" : "${args.show_values_column!'show'}"
6+
componentId: "${instance.object.id}",
7+
application: "${args.application!''}",
8+
valueFilter: "${args.valueFilter!''}",
9+
limit: "${args.limit!''}",
10+
rowsPerPage: "${args.rowsPerPage!'10'}",
11+
additionalQueryParams: "${args.additionalQueryParams!''}",
12+
show_id_column: "${args.show_id_column!'show'}",
13+
show_user_column: "${args.show_user_column!'show'}",
14+
show_time_column: "${args.show_time_column!'show'}",
15+
show_values_column: "${args.show_values_column!'show'}"
1616
}).setMessages(${messages});
1717
1818
<#-- dashlet resizer does not dynamically adjust the number of rows displayed on the page re: pagination -->
1919
<#-- the number of rows can be configured in the dialog though, sufficient for now -->
2020
<#-- future research : subscribe to rowsPerPageChange, "" etc... -->
2121
new Alfresco.widget.DashletResizer("${el}", "${instance.object.id}").setOptions(
2222
{
23-
<#-- IE (as usual) needs apparently a default height, otherwise resizing may not work in some situations -->
24-
"minDashletHeight": ${default_height}
23+
<#-- IE (as usual) needs apparently a default height, otherwise resizing may not work in some situations -->
24+
minDashletHeight: ${default_height}
2525
});
2626
2727
//]]></script>
2828

2929
<div class="dashlet audit-application-dashlet" id="${el}-dashlet">
30-
<div class="title" id="${el}-title">${msg("audit.dashlet.header.default")}</div>
31-
<div class="refresh"><a id="${el}-refresh" href="#">&nbsp;</a></div>
30+
<div class="title" id="${el}-title">${msg("audit.dashlet.header.default")}</div>
31+
<div class="refresh"><a id="${el}-refresh" href="#">&nbsp;</a></div>
3232

3333

3434
<div class="toolbar yui-toolbar" id="${el}-toolbar">
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<webscript>
2-
<shortname>Audit Dashlet Configuration Dialog</shortname>
3-
<description>Configuration dialog for the sample audit dashlet</description>
4-
<url>/modules/dashlet/audit-application/config</url>
2+
<shortname>Audit Dashlet Configuration Dialog</shortname>
3+
<description>Configuration dialog for the sample audit dashlet</description>
4+
<url>/modules/dashlet/audit-application/config</url>
55
</webscript>

source/web/extras/components/dashlets/audit-application.css

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919

2020
.audit-application-dashlet .yui-dt table
2121
{
22-
width: 97%;
23-
border-collapse: collapse;
24-
border: 1px solid #cbcbcb;
25-
margin-left: 5px;
22+
width: 97%;
23+
border-collapse: collapse;
24+
border: 1px solid #cbcbcb;
25+
margin-left: 5px;
2626

27-
/* google chrome : wrapping long, non-spaced, blocks of text */
28-
word-break: break-all;
29-
/* firefox : wrapping long, non-spaced, blocks of text */
30-
word-wrap: break-word;
27+
/* google chrome : wrapping long, non-spaced, blocks of text */
28+
word-break: break-all;
29+
/* firefox : wrapping long, non-spaced, blocks of text */
30+
word-wrap: break-word;
3131
}
3232

3333
.audit-application-dashlet .custom-scrollable-list
@@ -39,12 +39,12 @@
3939

4040
.audit-application-dashlet thead .yui-dt-label
4141
{
42-
padding-right: 5px;
42+
padding-right: 5px;
4343
}
4444

4545
.audit-application-dashlet .yui-pg-container
4646
{
47-
padding-left: 10px;
47+
padding-left: 10px;
4848
}
4949

5050
.spaced-left
@@ -64,18 +64,18 @@
6464

6565
.custom-align-right
6666
{
67-
float: right;
67+
float: right;
6868
}
6969

7070
.spaced-height
7171
{
72-
padding-top: 5px;
73-
padding-bottom: 5px;
72+
padding-top: 5px;
73+
padding-bottom: 5px;
7474
}
7575

7676
.ac-app-ie
7777
{
78-
padding-left: 8px !important;
78+
padding-left: 8px !important;
7979
}
8080

8181
.audit-application-dashlet .refresh
@@ -102,22 +102,22 @@
102102

103103
.audit-application-dashlet .shy
104104
{
105-
display: none;
105+
display: none;
106106
}
107107

108108
.audit-application-dashlet .invalid-regex
109109
{
110-
background-color: #ffa6a6;
110+
background-color: #ffa6a6;
111111
}
112112

113113
.audit-application-dashlet .valid-regex
114114
{
115-
background-color: #a6ffa6;
115+
background-color: #a6ffa6;
116116
}
117117

118118
.audit-application-dashlet .regex-highlight
119119
{
120-
font-weight:bold;
121-
background-color: #ffffa6;
120+
font-weight:bold;
121+
background-color: #ffffa6;
122122
}
123123

source/web/extras/components/dashlets/audit-application.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -522,9 +522,9 @@ if (typeof Extras.dashlet == "undefined" || !Extras.dashlet)
522522
// the least long array to avoid out-of-bounds reads
523523
for (var match_index = 0; match_index < Math.min(matches.length,unmarked_matches.length); match_index++)
524524
{
525-
var linked=link_start+$html(unmarked_matches[match_index])+link_class
526-
+matches[match_index].swapHighlightMarkers()
527-
+link_end;
525+
var linked = link_start+$html(unmarked_matches[match_index])+link_class
526+
+ matches[match_index].swapHighlightMarkers()
527+
+ link_end;
528528

529529
// switch out the plain noderef for a doc details link on that same noderef
530530
displayed_value=displayed_value.replace(matches[match_index],linked);
@@ -616,7 +616,7 @@ if (typeof Extras.dashlet == "undefined" || !Extras.dashlet)
616616
],
617617
metaFields:
618618
{
619-
totalRecords : "count"
619+
totalRecords : "count"
620620
}
621621
};
622622

@@ -893,9 +893,9 @@ if (typeof Extras.dashlet == "undefined" || !Extras.dashlet)
893893
// also make sure we've gone through the entire input string, even if this current portion does not match
894894
var new_remainder=remainder.substr(remaining_match[0].length ==0 ? 1 : remaining_match.index + remaining_match[0].length);
895895
if (!new_remainder || remainder == new_remainder)
896-
break;
896+
break;
897897
else
898-
remainder = new_remainder;
898+
remainder = new_remainder;
899899

900900
// for the next iteration
901901
previous_remaining_match=remaining_match;
@@ -909,16 +909,16 @@ if (typeof Extras.dashlet == "undefined" || !Extras.dashlet)
909909
// We've moved across the whole string. Go back and replace what we've deferred, if any
910910
for(var deferred_index = 0; deferred_index < deferred_matching_strings.length; deferred_index++)
911911
{
912-
if (indexOfWrapper(matching_strings,deferred_matching_strings[deferred_index]) == -1)
913-
{
914-
var deferred_regex = new RegExp(deferred_matching_strings[deferred_index].sanitizeforHighlighting(),"g")
915-
field_value=field_value.replace(deferred_regex,highlight_open_marker+deferred_matching_strings[deferred_index]+highlight_close_marker);
916-
}
912+
if (indexOfWrapper(matching_strings,deferred_matching_strings[deferred_index]) == -1)
913+
{
914+
var deferred_regex = new RegExp(deferred_matching_strings[deferred_index].sanitizeforHighlighting(),"g")
915+
field_value=field_value.replace(deferred_regex,highlight_open_marker+deferred_matching_strings[deferred_index]+highlight_close_marker);
916+
}
917917
}
918918

919919
// eliminate potential useless successive close open and open close markers
920-
field_value=field_value.replace(new RegExp(highlight_close_marker+highlight_open_marker,"g"),"")
921-
.replace(new RegExp(highlight_open_marker+highlight_close_marker,"g"),"");
920+
field_value= field_value.replace(new RegExp(highlight_close_marker+highlight_open_marker,"g"),"")
921+
.replace(new RegExp(highlight_open_marker+highlight_close_marker,"g"),"");
922922

923923
// marker block elision : eliminate nested markers, that are already enclosed in a larger mark block
924924
// replace the field value with the elided version
@@ -966,20 +966,20 @@ if (typeof Extras.dashlet == "undefined" || !Extras.dashlet)
966966
*/
967967
refreshDataTable_SearchWithinResults : function AuditApplication_refreshDataTable_searchWithinResults()
968968
{
969-
// get state for the new request. restate how the sorting order the data comes from straight from the datasource
970-
var state = this.dataTable.getState();
969+
// get state for the new request. restate how the sorting order the data comes from straight from the datasource
970+
var state = this.dataTable.getState();
971971
state.sortedBy = {key:'id', dir:YAHOO.widget.DataTable.CLASS_DESC};
972972

973-
// Get filtered data
974-
// If the search box is not empty, we add an internal query param that will not be used by the server,
975-
// but that we will use in doBeforeCallback to further refine and filter results that do not match the box value
976-
this.entriesDataSource.sendRequest(this.searchBoxContainer.value ? "&searchWithinResults=" + this.searchBoxContainer.value : "",
977-
{
978-
success : this.dataTable.onDataReturnInitializeTable,
979-
failure : this.dataTable.onDataReturnInitializeTable,
980-
scope : this.dataTable,
981-
argument: state
982-
});
973+
// Get filtered data
974+
// If the search box is not empty, we add an internal query param that will not be used by the server,
975+
// but that we will use in doBeforeCallback to further refine and filter results that do not match the box value
976+
this.entriesDataSource.sendRequest(this.searchBoxContainer.value ? "&searchWithinResults=" + this.searchBoxContainer.value : "",
977+
{
978+
success : this.dataTable.onDataReturnInitializeTable,
979+
failure : this.dataTable.onDataReturnInitializeTable,
980+
scope : this.dataTable,
981+
argument: state
982+
});
983983
},
984984

985985
lastButtonRefreshEventTimeStamp : null,

0 commit comments

Comments
 (0)