Skip to content

Commit c90c55c

Browse files
committed
Merge branch 'master' of github.com:Silverpeas/Silverpeas-Core into bug-3897_master
2 parents b06f6e3 + ee74793 commit c90c55c

File tree

5 files changed

+22
-19
lines changed

5 files changed

+22
-19
lines changed

lib-core/src/test/java/org/silverpeas/process/io/file/FileHandlerTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public void test_getHandledFile() throws Exception {
102102
@Test
103103
public void test_getHandledTemporaryFile() throws Exception {
104104
File test = fileHandler.getSessionTemporaryFile("tmpFile");
105-
File expected = getFile(sessionRootPath, currentSession.getId(), "@#@work@#@", "tmpfile");
105+
File expected = getFile(sessionRootPath, currentSession.getId(), "@#@work@#@", "tmpFile");
106106
assertFileNames(test, expected);
107107
assertThat(expected.exists(), is(false));
108108
}
@@ -1226,16 +1226,16 @@ public void test_isFileNewer() throws Exception {
12261226
final File file1 = getFile(sessionComponentPath, "file1");
12271227
final File file2 = getFile(sessionComponentPath, "file2");
12281228
touch(file1);
1229-
Thread.sleep(10);
1229+
Thread.sleep(1000);
12301230
touch(file2);
12311231
boolean test = fileHandler.isFileNewer(BASE_PATH_TEST, real1, file2);
12321232
assertThat(test, is(false));
1233-
Thread.sleep(10);
1233+
Thread.sleep(1000);
12341234
writeStringToFile(file1, "toto");
12351235
test = fileHandler.isFileNewer(BASE_PATH_TEST, real1, file2);
12361236
assertThat(test, is(true));
12371237

1238-
Thread.sleep(10);
1238+
Thread.sleep(1000);
12391239
final Date date = new Date();
12401240
test = fileHandler.isFileNewer(BASE_PATH_TEST, real1, date);
12411241
assertThat(test, is(false));
@@ -1244,7 +1244,7 @@ public void test_isFileNewer() throws Exception {
12441244
test = fileHandler.isFileNewer(BASE_PATH_TEST, real1, time);
12451245
assertThat(test, is(false));
12461246

1247-
Thread.sleep(10);
1247+
Thread.sleep(1000);
12481248
writeStringToFile(file1, "titi");
12491249
test = fileHandler.isFileNewer(BASE_PATH_TEST, real1, date);
12501250
assertThat(test, is(true));
@@ -1282,16 +1282,16 @@ public void test_isFileOlder() throws Exception {
12821282
final File file1 = getFile(sessionComponentPath, "file1");
12831283
final File file2 = getFile(sessionComponentPath, "file2");
12841284
touch(file1);
1285-
Thread.sleep(10);
1285+
Thread.sleep(1000);
12861286
touch(file2);
12871287
boolean test = fileHandler.isFileOlder(BASE_PATH_TEST, real1, file2);
12881288
assertThat(test, is(true));
1289-
Thread.sleep(10);
1289+
Thread.sleep(1000);
12901290
writeStringToFile(file1, "toto");
12911291
test = fileHandler.isFileOlder(BASE_PATH_TEST, real1, file2);
12921292
assertThat(test, is(false));
12931293

1294-
Thread.sleep(10);
1294+
Thread.sleep(1000);
12951295
final Date date = new Date();
12961296
test = fileHandler.isFileOlder(BASE_PATH_TEST, real1, date);
12971297
assertThat(test, is(true));
@@ -1300,7 +1300,7 @@ public void test_isFileOlder() throws Exception {
13001300
test = fileHandler.isFileOlder(BASE_PATH_TEST, real1, time);
13011301
assertThat(test, is(true));
13021302

1303-
Thread.sleep(10);
1303+
Thread.sleep(1000);
13041304
writeStringToFile(file1, "titi");
13051305
test = fileHandler.isFileOlder(BASE_PATH_TEST, real1, date);
13061306
assertThat(test, is(false));

lib-core/src/test/java/org/silverpeas/process/io/file/HandledFileTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -812,20 +812,20 @@ public void test_isFileNewer() throws Exception {
812812
final File file1 = getFile(sessionComponentPath, "file1");
813813
final File file2 = getFile(sessionComponentPath, "file2");
814814
touch(file1);
815-
Thread.sleep(10);
815+
Thread.sleep(1000);
816816
touch(file2);
817817
boolean test = getHandledFile(real1).isFileNewer(file2);
818818
assertThat(test, is(false));
819819
test = getHandledFile(real1).isFileNewer(getHandledFile(file2));
820820
assertThat(test, is(false));
821-
Thread.sleep(10);
821+
Thread.sleep(1000);
822822
writeStringToFile(file1, "toto");
823823
test = getHandledFile(real1).isFileNewer(file2);
824824
assertThat(test, is(true));
825825
test = getHandledFile(real1).isFileNewer(getHandledFile(file2));
826826
assertThat(test, is(true));
827827

828-
Thread.sleep(10);
828+
Thread.sleep(1000);
829829
final Date date = new Date();
830830
test = getHandledFile(real1).isFileNewer(date);
831831
assertThat(test, is(false));
@@ -834,7 +834,7 @@ public void test_isFileNewer() throws Exception {
834834
test = getHandledFile(real1).isFileNewer(time);
835835
assertThat(test, is(false));
836836

837-
Thread.sleep(10);
837+
Thread.sleep(1000);
838838
writeStringToFile(file1, "titi");
839839
test = getHandledFile(real1).isFileNewer(date);
840840
assertThat(test, is(true));
@@ -852,20 +852,20 @@ public void test_isFileOlder() throws Exception {
852852
final File file1 = getFile(sessionComponentPath, "file1");
853853
final File file2 = getFile(sessionComponentPath, "file2");
854854
touch(file1);
855-
Thread.sleep(10);
855+
Thread.sleep(1000);
856856
touch(file2);
857857
boolean test = getHandledFile(real1).isFileOlder(file2);
858858
assertThat(test, is(true));
859859
test = getHandledFile(real1).isFileOlder(getHandledFile(file2));
860860
assertThat(test, is(true));
861-
Thread.sleep(10);
861+
Thread.sleep(1000);
862862
writeStringToFile(file1, "toto");
863863
test = getHandledFile(real1).isFileOlder(file2);
864864
assertThat(test, is(false));
865865
test = getHandledFile(real1).isFileOlder(getHandledFile(file2));
866866
assertThat(test, is(false));
867867

868-
Thread.sleep(10);
868+
Thread.sleep(1000);
869869
final Date date = new Date();
870870
test = getHandledFile(real1).isFileOlder(date);
871871
assertThat(test, is(true));
@@ -874,7 +874,7 @@ public void test_isFileOlder() throws Exception {
874874
test = getHandledFile(real1).isFileOlder(time);
875875
assertThat(test, is(true));
876876

877-
Thread.sleep(10);
877+
Thread.sleep(1000);
878878
writeStringToFile(file1, "titi");
879879
test = getHandledFile(real1).isFileOlder(date);
880880
assertThat(test, is(false));
Binary file not shown.

war-core/src/main/webapp/util/javaScript/flexpaper/flexpaper_handlers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ $(function() {
2828
* @param String link
2929
*/
3030
jQuery('#documentViewer').bind('onExternalLinkClicked',function(e,link){
31-
31+
window.location.href = link;
3232
});
3333

3434
/**

web-core/src/main/java/com/stratelia/webactiv/util/viewGenerator/html/JavascriptPluginInclusion.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public class JavascriptPluginInclusion {
6262
private static final String SILVERPEAS_VIEW = "silverpeas-view.js";
6363
private static final String flexPaperPath = javascriptPath + "flexpaper/";
6464
private static final String FLEXPAPER_FLASH = "flexpaper.js";
65+
private static final String FLEXPAPER_HANDLERS = "flexpaper_handlers.js";
6566
private static final String wysiwygPath = URLManager.getApplicationURL() + "/wysiwyg/jsp/";
6667
private static final String JAVASCRIPT_CKEDITOR = "ckeditor/ckeditor.js";
6768
private static final String JAVASCRIPT_TYPE = "text/javascript";
@@ -169,6 +170,8 @@ public static ElementContainer includePreview(final ElementContainer xhtml) {
169170
xhtml.addElement(popup);
170171
popup = new script().setType(JAVASCRIPT_TYPE).setSrc(flexPaperPath + FLEXPAPER_FLASH);
171172
xhtml.addElement(popup);
173+
popup = new script().setType(JAVASCRIPT_TYPE).setSrc(flexPaperPath + FLEXPAPER_HANDLERS);
174+
xhtml.addElement(popup);
172175
return xhtml;
173176
}
174177

@@ -184,7 +187,7 @@ public static ElementContainer includeCalendar(final ElementContainer xhtml) {
184187
xhtml.addElement(sivlerpeasCalendar);
185188
return xhtml;
186189
}
187-
190+
188191
public static ElementContainer includeJQuery(final ElementContainer xhtml) {
189192
script jquery = new script().setType(JAVASCRIPT_TYPE).setSrc(jqueryPath
190193
+ GraphicElementFactory.JQUERY_JS);

0 commit comments

Comments
 (0)