Changeset 26305 for main/trunk/greenstone3/web
- Timestamp:
- 2012-10-11T14:52:29+13:00 (12 years ago)
- Location:
- main/trunk/greenstone3/web/interfaces/default
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/js/document_scripts.js
r26302 r26305 1291 1291 function showSlideShow() 1292 1292 { 1293 var visible = $("#ssOption").attr('checked'); 1294 if(visible) 1295 { 1296 $("#gs-document").hide(); 1297 if(!($("#gs-slideshow").length)) 1298 { 1299 var slideshowDiv = $("<div>", {id:"gs-slideshow"}); 1300 var loadingImage = $("<img>", {src:gs.imageURLs.loading}); 1301 slideshowDiv.append(loadingImage); 1302 1303 $("#gs-document").after(slideshowDiv); 1304 1305 retrieveImagesForSlideShow(function(imageIDArray) 1306 { 1307 loadingImage.hide(); 1308 if(imageIDArray && imageIDArray.length > 0) 1309 { 1310 var imageURLs = new Array(); 1311 for(var i = 0; i < imageIDArray.length; i++) 1293 $("#ssOption").attr('checked', false); 1294 if(!($("#gs-slideshow").length)) 1295 { 1296 var slideshowDiv = $("<div>", {id:"gs-slideshow"}); 1297 var loadingImage = $("<img>", {src:gs.imageURLs.loading}); 1298 slideshowDiv.append(loadingImage); 1299 1300 $.blockUI({message: $(slideshowDiv), css:{top: "5%", left: "5%", width: "90%", height: "90%", overflow: "auto", cursor: "auto"}}); 1301 1302 retrieveImagesForSlideShow(function(imageIDArray) 1303 { 1304 loadingImage.hide(); 1305 if(imageIDArray && imageIDArray.length > 0) 1306 { 1307 var imageURLs = new Array(); 1308 for(var i = 0; i < imageIDArray.length; i++) 1309 { 1310 if(imageIDArray[i].source && imageIDArray[i].source.search(/.*\.(gif|jpg|jpeg|png)$/) != -1) 1312 1311 { 1313 if(imageIDArray[i].source && imageIDArray[i].source.search(/.*\.(gif|jpg|jpeg|png)$/) != -1) 1314 { 1315 imageURLs.push(gs.collectionMetadata.httpPath + "/index/assoc/" + gs.documentMetadata.assocfilepath + "/" + imageIDArray[i].source); 1316 } 1312 imageURLs.push(gs.collectionMetadata.httpPath + "/index/assoc/" + gs.documentMetadata.assocfilepath + "/" + imageIDArray[i].source); 1317 1313 } 1318 new SlideShowWidget(slideshowDiv, imageURLs, imageIDArray); 1319 } 1320 }); 1321 } 1322 else 1323 { 1324 $("#gs-slideshow").show(); 1325 } 1326 1327 if($("#zoomOptions").length) 1328 { 1329 $("#zoomOptions").hide(); 1330 } 1314 } 1315 new SlideShowWidget(slideshowDiv, imageURLs, imageIDArray); 1316 } 1317 }); 1331 1318 } 1332 1319 else 1333 1320 { 1334 if($("#gs-slideshow").length) 1335 { 1336 $("#gs-slideshow").hide(); 1337 } 1338 $("#gs-document").show(); 1339 1340 if($("#zoomOptions").length) 1341 { 1342 $("#zoomOptions").show(); 1343 } 1321 $("#gs-slideshow").show(); 1322 } 1323 1324 if($("#zoomOptions").length) 1325 { 1326 $("#zoomOptions").hide(); 1344 1327 } 1345 1328 } … … 1384 1367 var _nextButton = $("<img>", {src:gs.imageURLs.next, style:"float:right; cursor:pointer;"}); 1385 1368 var _prevButton = $("<img>", {src:gs.imageURLs.prev, style:"float:left; cursor:pointer; display:none;"}); 1369 var _closeLink = $("<a href=\"javascript:$.unblockUI()\">Close Slideshow</a>"); 1386 1370 var _clearDiv = $("<div>", {style:"clear:both;"}); 1387 1371 var _currentIndex = 0; 1388 1372 1389 1373 _navDiv.append(_nextButton); 1374 _navDiv.append(_closeLink); 1390 1375 _navDiv.append(_prevButton); 1391 1376 _navDiv.append(_clearDiv); … … 1418 1403 } 1419 1404 1420 _imageDiv.fadeOut( 1000, function()1405 _imageDiv.fadeOut(500, function() 1421 1406 { 1422 1407 _imageDiv.empty(); 1423 1408 _imageDiv.append(_images[_currentIndex + 1]); 1424 1409 _currentIndex++; 1425 _imageDiv.fadeIn( 1000, function()1410 _imageDiv.fadeIn(500, function() 1426 1411 { 1427 1412 _inTransition = false; … … 1449 1434 } 1450 1435 1451 _imageDiv.fadeOut( 1000, function()1436 _imageDiv.fadeOut(500, function() 1452 1437 { 1453 1438 _imageDiv.empty(); 1454 1439 _imageDiv.append(_images[_currentIndex - 1]); 1455 1440 _currentIndex--; 1456 _imageDiv.fadeIn( 1000, function()1441 _imageDiv.fadeIn(500, function() 1457 1442 { 1458 1443 _inTransition = false; … … 1480 1465 _inTransition = true; 1481 1466 _currentIndex = index; 1482 _imageDiv.fadeOut( 1000, function()1467 _imageDiv.fadeOut(500, function() 1483 1468 { 1484 1469 _imageDiv.empty(); 1485 1470 _imageDiv.append(_images[_currentIndex]); 1486 _imageDiv.fadeIn( 1000, function()1471 _imageDiv.fadeIn(500, function() 1487 1472 { 1488 1473 _inTransition = false; -
main/trunk/greenstone3/web/interfaces/default/style/core.css
r26301 r26305 151 151 position: relative; 152 152 margin: 0 auto 20px auto; 153 width: 80%;153 max-width: 1000px; 154 154 padding: 0; 155 155 line-height: 120%; … … 160 160 #topArea { 161 161 border: none; 162 width: 80%;162 max-width: 1000px; 163 163 margin: 20px auto 0; 164 164 } … … 840 840 } 841 841 842 #gs-slideshow{843 width:65%;844 }845 846 842 .slideshowImage{ 847 843 width:100%; -
main/trunk/greenstone3/web/interfaces/default/transform/layouts/header.xsl
r26284 r26305 56 56 <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery-ui.min.js"><xsl:text> </xsl:text></script> 57 57 <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.themeswitcher.min.js"><xsl:text> </xsl:text></script> 58 <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.blockUI.js"><xsl:text> </xsl:text></script> 58 59 59 60 <script type="text/javascript" src="interfaces/{$interface_name}/js/direct-edit.js"><xsl:text> </xsl:text></script>
Note:
See TracChangeset
for help on using the changeset viewer.