@@ -68,66 +68,65 @@ if (action == null) {
68
68
69
69
<view:sp-page >
70
70
<view:sp-head-part >
71
- <view:script src =" javaScript/spacesInURL.js" />
72
71
<view:script src =" javaScript/commons.js" />
73
72
<script type =" text/javascript" >
74
73
75
- var topicAddWindow = window ;
76
- var topicUpdateWindow = window ;
74
+ let topicAddWindow = window ;
75
+ let topicUpdateWindow = window ;
77
76
78
- /* **************************************************************************/
77
+ /* **************************************************************************/
79
78
80
79
function declassify (nbTopic , nbSite ) {
81
80
closeWindows ();
82
81
83
- okTopic = " false" ;
84
- okSites = " false" ;
82
+ let okTopic = false ;
83
+ let okSites = false ;
85
84
86
85
if (nbTopic > 0 ) {
87
- if (nbTopic == 1 ) {
86
+ if (nbTopic === 1 ) {
88
87
if (document .liste .checkbox .checked )
89
- okTopic = " true" ;
88
+ okTopic = true ;
90
89
}
91
90
else {
92
- for (i= 0 ; i< nbTopic; i++ ) {
91
+ for (let i= 0 ; i< nbTopic; i++ ) {
93
92
if (document .liste .checkbox [i] != null ) {
94
93
if (document .liste .checkbox [i].checked )
95
- okTopic = " true" ;
94
+ okTopic = true ;
96
95
}
97
96
else break ;
98
97
}
99
98
}
100
99
}
101
100
102
101
if (nbSite > 0 ) {
103
- if (nbSite == 1 ) {
102
+ if (nbSite === 1 ) {
104
103
if (document .liste .supSite .checked )
105
- okSites = " true" ;
104
+ okSites = true ;
106
105
}
107
106
else {
108
- for (i= 0 ; i< nbSite; i++ ) {
107
+ for (let i= 0 ; i< nbSite; i++ ) {
109
108
if (document .liste .supSite [i] != null ) {
110
109
if (document .liste .supSite [i].checked )
111
- okSites = " true" ;
110
+ okSites = true ;
112
111
}
113
112
else break ;
114
113
}
115
114
}
116
115
}
117
116
118
117
119
- if (okTopic != " false" || okSites != " false" ) { // au moins un theme ou un site est selectionne
118
+ if (okTopic !== false || okSites !== false ) { // au moins un theme ou un site est selectionne
120
119
121
- var label = " <%= resources. getString(" FolderSiteDeleteConfirmation" ) % >" ;
122
- jQuery .popup .confirm (label, function () {
123
- listeSite = " " ;
120
+ const label = " <%= resources. getString(" FolderSiteDeleteConfirmation" ) % >" ;
121
+ jQuery .popup .confirm (label, function () {
122
+ let listeSite = " " ;
124
123
125
124
if (nbSite > 0 ) {
126
- if (nbSite == 1 ) {
125
+ if (nbSite === 1 ) {
127
126
if (document .liste .supSite .checked )
128
127
listeSite += document .liste .supSite .value + " ," ;
129
128
} else {
130
- for (i= 0 ; i< nbSite; i++ ) {
129
+ for (let i= 0 ; i< nbSite; i++ ) {
131
130
if (document .liste .supSite [i] != null ) {
132
131
if (document .liste .supSite [i].checked )
133
132
listeSite += document .liste .supSite [i].value + " ," ;
@@ -147,15 +146,15 @@ function declassify(nbTopic, nbSite) {
147
146
/* **************************************************************************/
148
147
149
148
function topicAdd (fatherId ) {
150
- if (! topicAddWindow .closed && topicAddWindow .name == " topicAddWindow" )
151
- topicAddWindow .close ();
152
-
153
- path = document .liste .Path .value ;
154
- windowName = " topicAddWindow" ;
155
- larg = " 670" ;
156
- haut = " 270" ;
157
- windowParams = " directories=0,menubar=0,toolbar=0,alwaysRaised" ;
158
- topicAddWindow = SP_openWindow ({
149
+ if (! topicAddWindow .closed && topicAddWindow .name === " topicAddWindow" )
150
+ topicAddWindow .close ();
151
+
152
+ const path = document .liste .Path .value ;
153
+ const windowName = " topicAddWindow" ;
154
+ const larg = " 670" ;
155
+ const haut = " 270" ;
156
+ const windowParams = " directories=0,menubar=0,toolbar=0,alwaysRaised" ;
157
+ topicAddWindow = SP_openWindow ({
159
158
url : ' addTopic.jsp' ,
160
159
params : {
161
160
' Id' : fatherId,
@@ -168,16 +167,16 @@ function topicAdd(fatherId) {
168
167
/* **************************************************************************/
169
168
170
169
function topicUpdate (id ) {
171
- if (! topicUpdateWindow .closed && topicUpdateWindow .name == " topicUpdateWindow" )
170
+ if (! topicUpdateWindow .closed && topicUpdateWindow .name = == " topicUpdateWindow" )
172
171
topicUpdateWindow .close ();
173
172
174
173
document .liste .ChildId .value = id;
175
- path = document .liste .Path .value ;
176
- windowName = " topicUpdateWindow" ;
177
- larg = " 670" ;
178
- haut = " 270" ;
179
- windowParams = " directories=0,menubar=0,toolbar=0, alwaysRaised" ;
180
- topicUpdateWindow = SP_openWindow ({
174
+ const path = document .liste .Path .value ;
175
+ const windowName = " topicUpdateWindow" ;
176
+ const larg = " 670" ;
177
+ const haut = " 270" ;
178
+ const windowParams = " directories=0,menubar=0,toolbar=0, alwaysRaised" ;
179
+ topicUpdateWindow = SP_openWindow ({
181
180
url : ' updateTopic.jsp' ,
182
181
params : {
183
182
' ChildId' : id,
@@ -200,10 +199,10 @@ function publicationAdd(topicId){
200
199
/* **************************************************************************/
201
200
202
201
function closeWindows () {
203
- if (! topicAddWindow .closed && topicAddWindow .name == " topicAddWindow" )
202
+ if (! topicAddWindow .closed && topicAddWindow .name === " topicAddWindow" )
204
203
topicAddWindow .close ();
205
204
206
- if (! topicUpdateWindow .closed && topicUpdateWindow .name == " topicUpdateWindow" )
205
+ if (! topicUpdateWindow .closed && topicUpdateWindow .name === " topicUpdateWindow" )
207
206
topicUpdateWindow .close ();
208
207
}
209
208
@@ -361,10 +360,10 @@ window.wsm = new WebSiteManager({
361
360
out. println(arrayPane. print());
362
361
363
362
// Liste des sites du th�me courant
364
- String liste = " " ;
363
+ StringBuilder liste = new StringBuilder () ;
365
364
366
- if (listeSites. size() > 0 ) {
367
- liste += " <table border=\" 0\" >\n " ;
365
+ if (! listeSites. isEmpty() ) {
366
+ liste. append( " <table border=\" 0\" >\n " ) ;
368
367
369
368
nbChild = 0 ;
370
369
@@ -373,8 +372,8 @@ window.wsm = new WebSiteManager({
373
372
String siteId = site. getVersion();
374
373
String siteName = site. getName();
375
374
String siteDescription = WebEncodeHelper . javaStringToHtmlParagraphe(site. getDescription());
376
- liste += " <tr>\n " ;
377
- liste += " <td valign=\" top\" width=\" 5%\" ><input type=\" checkbox\" name=\" supSite\" value=\" " + pubId+ " \" /></td>\n " ;
375
+ liste. append( " <tr>\n " ) ;
376
+ liste. append( " <td valign=\" top\" width=\" 5%\" ><input type=\" checkbox\" name=\" supSite\" value=\" " ) . append( pubId) . append( " \" /></td>\n " ) ;
378
377
if (scc. isSortedTopicsEnabled()) {
379
378
IconPane sortPane = gef. getIconPane();
380
379
if (nbChild != 0 ) {
@@ -387,27 +386,27 @@ window.wsm = new WebSiteManager({
387
386
downIcon. setProperties(downIconSrc, resources. getString(" PubDown" )+ " '" + siteName+ " '" , " javascript:onClick=pubDown('" + pubId+ " ')" );
388
387
}
389
388
390
- liste += " <td width=\" 10px\" > </td>\n " ;
389
+ liste. append( " <td width=\" 10px\" > </td>\n " ) ;
391
390
392
- liste += " <td width=\" 20px\" valign=\" top\" >\n " ;
393
- liste += sortPane. print();
394
- liste += " </td>\n " ;
391
+ liste. append( " <td width=\" 20px\" valign=\" top\" >\n " ) ;
392
+ liste. append( sortPane. print() );
393
+ liste. append( " </td>\n " ) ;
395
394
396
- liste += " <td width=\" 10px\" > </td>\n " ;
395
+ liste. append( " <td width=\" 10px\" > </td>\n " ) ;
397
396
}
398
- liste += " <td valign=\" top\" >• <a class=\" textePetitBold\" href=\" javascript:onClick=wsm.goToSite('" + siteId+ " ')\" >" + siteName+ " </a><br/>\n " ;
397
+ liste. append( " <td valign=\" top\" >• <a class=\" textePetitBold\" href=\" javascript:onClick=wsm.goToSite('" ) . append( siteId) . append( " ')\" >" ) . append( siteName) . append( " </a><br/>\n " ) ;
399
398
400
- liste += " <span class=\" txtnote\" > " + siteDescription+ " </span><br/><br/></td>\n " ;
401
- liste += " </tr>\n " ;
399
+ liste. append( " <span class=\" txtnote\" > " ) . append( siteDescription) . append( " </span><br/><br/></td>\n " ) ;
400
+ liste. append( " </tr>\n " ) ;
402
401
403
402
nbChild++ ;
404
403
}
405
404
406
- liste += " </table>\n " ;
405
+ liste. append( " </table>\n " ) ;
407
406
% >
408
407
<br />
409
408
<view:board >
410
- <%= liste % >
409
+ <%= liste. toString() % >
411
410
</view:board >
412
411
<%
413
412
}
0 commit comments