File tree 2 files changed +24
-6
lines changed
module-base/src/main/java/de/intranda/goobi/plugins
module-gui/src/main/webapp/resources/uii
2 files changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -246,6 +246,23 @@ public String getImageMoveTo() {
246
246
return this .imageIndex + 1 + "" ;
247
247
}
248
248
249
+
250
+ public String getHasPreviousPage () {
251
+ return hasPreviousPage () ? null : "disabled" ;
252
+ }
253
+
254
+ public String getHasNextPage () {
255
+ return hasNextPage () ? null : "disabled" ;
256
+ }
257
+
258
+ public boolean hasPreviousPage () {
259
+ return getImageIndex () > 0 ;
260
+ }
261
+
262
+ public boolean hasNextPage () {
263
+ return getImageIndex () < images .size () - 1 ;
264
+ }
265
+
249
266
public String cmdMoveFirst () {
250
267
setImageIndex (0 );
251
268
this .setImageToIndex ();
@@ -261,18 +278,16 @@ public String cmdMovePrevious() {
261
278
}
262
279
263
280
public String cmdMoveNext () {
264
- if (getImageIndex () != images . size () - 1 ) {
281
+ if (hasNextPage () ) {
265
282
setImageIndex (getImageIndex () + 1 );
266
283
this .setImageToIndex ();
267
284
}
268
285
return "" ;
269
286
}
270
287
271
288
public String cmdMoveLast () {
272
- if (getImageIndex () != images .size () - 1 ) {
273
- setImageIndex (images .size () - 1 );
274
- this .setImageToIndex ();
275
- }
289
+ setImageIndex (images .size () - 1 );
290
+ this .setImageToIndex ();
276
291
return "" ;
277
292
}
278
293
Original file line number Diff line number Diff line change 34
34
< button
35
35
class ="btn btn-blank "
36
36
jsf:action ="#{AktuelleSchritteForm.myPlugin.cmdMoveFirst} "
37
- disabled ="#{cc.attrs.paginator .getHasPreviousPage()} "
37
+ disabled ="#{AktuelleSchritteForm.myPlugin .getHasPreviousPage()} "
38
38
title ="#{AktuelleSchritteForm.myPlugin.pagesRTL?msgs.lastImage:msgs.firstImage} "
39
39
data-bs-toggle ="tooltip ">
40
40
< span
45
45
< button
46
46
class ="btn btn-primary-400 "
47
47
jsf:action ="#{AktuelleSchritteForm.myPlugin.cmdMovePrevious} "
48
+ disabled ="#{AktuelleSchritteForm.myPlugin.getHasPreviousPage()} "
48
49
jsf:id ="imageBack ">
49
50
< span
50
51
aria-hidden ="true "
82
83
< button
83
84
class ="btn btn-primary-400 "
84
85
jsf:action ="#{AktuelleSchritteForm.myPlugin.cmdMoveNext} "
86
+ disabled ="#{AktuelleSchritteForm.myPlugin.getHasNextPage()} "
85
87
jsf:id ="imageNext ">
86
88
< span >
87
89
< h:outputText value ="#{AktuelleSchritteForm.myPlugin.pagesRTL?msgs.lw_previousImage:msgs.lw_nextImage} " />
94
96
< button
95
97
class ="btn btn-blank "
96
98
jsf:action ="#{AktuelleSchritteForm.myPlugin.cmdMoveLast} "
99
+ disabled ="#{AktuelleSchritteForm.myPlugin.getHasNextPage()} "
97
100
jsf:id ="navlast "
98
101
title ="#{AktuelleSchritteForm.myPlugin.pagesRTL?msgs.firstImage:msgs.lastImage} ">
99
102
< span
You can’t perform that action at this time.
0 commit comments