fixed image planete and video planete widgets

preferencesAboutTextFull
unknown 13 years ago
parent 4a5d64c0ce
commit 928096459c
  1. 109
      resources/library/search/Image Planete.wgs/css/basic.css
  2. 30
      resources/library/search/Image Planete.wgs/index.html
  3. 104
      resources/library/search/Video Planete.wgs/css/basic.css
  4. 23
      resources/library/search/Video Planete.wgs/index.html

@ -6,10 +6,6 @@ html, body{
margin: 0; margin: 0;
} }
a {
text-decoration: none;
}
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 14px; width: 14px;
background-color:white; background-color:white;
@ -42,46 +38,51 @@ a {
border: 2px solid gray; border: 2px solid gray;
} }
.disclaimer{ a {
text-decoration: underline;
}
#disc_nav_cont{
height: auto; height: auto;
position: fixed; position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
margin-left: 1px; width: 100%;
margin-right: 1px; }
margin-bottom: 0px;
.disclaimer{
padding: 5px; padding: 5px;
text-align: center; text-align: center;
background-color: #BBBBBB; background-color: #BBBBBB;
-webkit-border-top-left-radius: 15px; border-top: solid 4px #EEEEEE;
-webkit-border-top-right-radius: 15px;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
border: solid 4px #EEEEEE;
border-bottom: none; border-bottom: none;
font-size: 12px; font-size: 12px;
z-index: 10; }
.resultFooter{
width: 100%;
padding: 3px;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-weight: bold;
font-size: x-large;
text-align: center;
background-color: white;
} }
#searchResult { #searchResult {
overflow: hidden; overflow: hidden;
text-align: center; text-align: center;
margin-top: 50px;
margin-bottom: 50px;
} }
.search{ .search{
width: 90%;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
padding: 5px; padding: 5px;
background-color: #BBBBBB; background-color: #BBBBBB;
-webkit-border-bottom-left-radius: 15px; border-bottom: solid 4px #EEEEEE;
-webkit-border-bottom-right-radius: 15px;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
border: solid 4px #EEEEEE;
border-top: none;
z-index: 101;
} }
.search, .search,
@ -91,33 +92,6 @@ a {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
} }
.togglePages{
padding: 0;
position: absolute;
bottom: -19px;
left: 40%;
width: 22%;
height: 15px;
background-color: #666;
-webkit-border-bottom-left-radius: 20px;
-webkit-border-bottom-right-radius: 20px;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
-webkit-box-shadow: #dadada -1px 0 4px;
box-shadow: #dadada -1px 0 4px;
cursor: pointer;
z-index: 100;
text-align: center;
}
.toggleIcon{
display: inline-block;
width: 14px;
height: 14px;
background: url(../images/trgUp.png) 50% no-repeat;
}
.searchInput{ .searchInput{
padding: 3px; padding: 3px;
float: left; float: left;
@ -177,31 +151,9 @@ a {
overflow: hidden; overflow: hidden;
font-size: small; font-size: small;
font-family: Verdana,Arial,Helvetica,sans-serif; font-family: Verdana,Arial,Helvetica,sans-serif;
border: 1px solid #666;
border-radius: 5px;
-webkit-box-shadow: #dadada -1px 0 4px;
-webkit-border-radius: 5px;
box-shadow: #666 -1px 0 4px;
vertical-align: top; vertical-align: top;
} }
.resultFooter{
float: left;
margin: 5px;
padding: 3px;
width: 100%;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-weight: bold;
font-size: x-large;
text-align: center;
}
#branding{
position: absolute;
top: 0;
left: 0;
z-index: 2;
}
.filterContainer{ .filterContainer{
float: left; float: left;
@ -356,18 +308,3 @@ input[type="radio"]:checked + .filter_button.button.color {
background-color: gray; background-color: gray;
color: white; color: white;
} }
/*
Planete Sankore Changes
*/
.searchButton{
right: 10px;
}
#subSearchInput{
padding-right: 5px;
}
.imgContainer img {
width: 100px;
}

@ -19,17 +19,18 @@
function addPaginationLinks(totalResults) { function addPaginationLinks(totalResults) {
var curPage = currentIndex; // check what page the app is on var curPage = currentIndex; // check what page the app is on
var pagesDiv = $("<div id='resultFooter' class='resultFooter'>"); var pagesDiv = $("<div id='resultFooter' class='resultFooter'>");
for (var i = 0; i < 10; i++) { for (var i = 0; i < 8; i++) {
if (i * limit < totalResults) { if (i * limit < totalResults) {
var link = $("<a class='pager_button'></a>").attr('href', 'javascript:gotoPage('+i+');').html(i).appendTo(pagesDiv); var link = $("<a class='pager_button'></a>").attr('href', 'javascript:gotoPage('+i+');').html(i+1).appendTo(pagesDiv);
if (curPage == i) { if (curPage == i) {
link.addClass('active'); link.addClass('active');
} }
} }
} }
pagesDiv.appendTo($('#searchResult')); $("#disc_nav_cont #resultFooter").remove();
pagesDiv.insertBefore($('#disclaimer'));
$(".imgContainer").each(function(){ $(".imgContainer").each(function(){
this.addEventListener("dragstart", imageDragging, false); this.addEventListener("dragstart", imageDragging, false);
@ -62,7 +63,7 @@
// For each result write it's title and image to the screen // For each result write it's title and image to the screen
var result = results[i]; var result = results[i];
var imgContainer = $("<div class='imgContainer' draggable='true'>"); var imgContainer = $("<div class='imgContainer' draggable='true'>");
var title = document.createElement('div'); //var title = document.createElement('div');
var iUrl = $("<input type='hidden'/>"); var iUrl = $("<input type='hidden'/>");
var iContent = $("<input type='hidden'/>"); var iContent = $("<input type='hidden'/>");
var iHeight = $("<input type='hidden'/>"); var iHeight = $("<input type='hidden'/>");
@ -71,7 +72,7 @@
// We use titleNoFormatting so that no HTML tags are left in the // We use titleNoFormatting so that no HTML tags are left in the
// title // title
title.innerHTML = result.title; //title.innerHTML = result.title;
var newImg = document.createElement('img'); var newImg = document.createElement('img');
// There is also a result.file property which has the escaped version // There is also a result.file property which has the escaped version
@ -89,7 +90,7 @@
iHeight.attr("value", result.height); iHeight.attr("value", result.height);
iWidth.attr("value", result.width); iWidth.attr("value", result.width);
iTitle.attr("value",result.title); iTitle.attr("value",result.title);
imgContainer.append($(title)); //imgContainer.append($(title));
imgContainer.append(iUrl); imgContainer.append(iUrl);
imgContainer.append(iContent); imgContainer.append(iContent);
imgContainer.append(iHeight); imgContainer.append(iHeight);
@ -128,7 +129,9 @@
var hide = false; //hide or no main panel var hide = false; //hide or no main panel
//basic containers and elements //basic containers and elements
var disclaimer = $("<div id='disclaimer' class='disclaimer'>Recherche d'images sur Planète Sankoré<div>").appendTo("body");
var disc_nav_cont = $("<div id='disc_nav_cont' class='disc_nav_cont'>").appendTo("body");
var disclaimer = $("<div id='disclaimer' class='disclaimer'>Recherche d'images sur Planète Sankoré<div>").appendTo(disc_nav_cont);
var search = $("<div id='search' class='search'>").appendTo("body"); var search = $("<div id='search' class='search'>").appendTo("body");
var togglePages = $("<div id='togglePages' class='togglePages'>").appendTo(search); var togglePages = $("<div id='togglePages' class='togglePages'>").appendTo(search);
@ -165,7 +168,7 @@
}); });
*/ */
togglePages.click(function(event){ /*togglePages.click(function(event){
if(mode){ if(mode){
hide = false; hide = false;
$("#search, #disclaimer").slideDown('slow', function(){ $("#search, #disclaimer").slideDown('slow', function(){
@ -181,12 +184,12 @@
}); });
mode = true; mode = true;
} }
}); });*/
searchButton.click(function(){ searchButton.click(function(){
if(!hide){ if(!hide){
runSearch(searchInput.val(), 0); runSearch(searchInput.val(), 0);
togglePages.trigger("click"); //togglePages.trigger("click");
} }
}); });
@ -194,7 +197,7 @@
if(!hide){ if(!hide){
if((event.keyCode == 0xA)||(event.keyCode == 0xD)){ if((event.keyCode == 0xA)||(event.keyCode == 0xD)){
runSearch(searchInput.val(), 0); runSearch(searchInput.val(), 0);
togglePages.trigger("click"); //togglePages.trigger("click");
} }
} }
@ -204,11 +207,11 @@
sankore.sendFileMetadata(createMetaData($(this))); sankore.sendFileMetadata(createMetaData($(this)));
})); }));
$(window).resize(function(){ /*$(window).resize(function(){
disclaimer.width($("body").width()-20); disclaimer.width($("body").width()-20);
search.width($("body").width()-20); search.width($("body").width()-20);
toggleIcon.css("margin-left",(togglePages.width()/2 - 7)); toggleIcon.css("margin-left",(togglePages.width()/2 - 7));
}) })*/
}); });
@ -250,7 +253,6 @@
</head> </head>
<body style="font-family: Arial;border: 0 none;"> <body style="font-family: Arial;border: 0 none;">
<div id="branding" style="float: left;"></div><br />
<div id="searchResult"></div> <div id="searchResult"></div>
</body> </body>
</html> </html>

@ -6,10 +6,6 @@ html, body{
margin: 0; margin: 0;
} }
a {
text-decoration: none;
}
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 14px; width: 14px;
background-color:white; background-color:white;
@ -42,46 +38,51 @@ a {
border: 2px solid gray; border: 2px solid gray;
} }
.disclaimer{ a {
text-decoration: underline;
}
#disc_nav_cont{
height: auto; height: auto;
position: fixed; position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
margin-left: 1px; width: 100%;
margin-right: 1px; }
margin-bottom: 0px;
.disclaimer{
padding: 5px; padding: 5px;
text-align: center; text-align: center;
background-color: #BBBBBB; background-color: #BBBBBB;
-webkit-border-top-left-radius: 15px; border-top: solid 4px #EEEEEE;
-webkit-border-top-right-radius: 15px;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
border: solid 4px #EEEEEE;
border-bottom: none; border-bottom: none;
font-size: 12px; font-size: 12px;
z-index: 10; }
.resultFooter{
width: 100%;
padding: 3px;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-weight: bold;
font-size: x-large;
text-align: center;
background-color: white;
} }
#searchResult { #searchResult {
overflow: hidden; overflow: hidden;
text-align: center; text-align: center;
margin-top: 50px;
margin-bottom: 50px;
} }
.search{ .search{
width: 90%;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
padding: 5px; padding: 5px;
background-color: #BBBBBB; background-color: #BBBBBB;
-webkit-border-bottom-left-radius: 15px; border-bottom: solid 4px #EEEEEE;
-webkit-border-bottom-right-radius: 15px;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
border: solid 4px #EEEEEE;
border-top: none;
z-index: 101;
} }
.search, .search,
@ -91,33 +92,6 @@ a {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
} }
.togglePages{
padding: 0;
position: absolute;
bottom: -19px;
left: 40%;
width: 22%;
height: 15px;
background-color: #666;
-webkit-border-bottom-left-radius: 20px;
-webkit-border-bottom-right-radius: 20px;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
-webkit-box-shadow: #dadada -1px 0 4px;
box-shadow: #dadada -1px 0 4px;
cursor: pointer;
z-index: 100;
text-align: center;
}
.toggleIcon{
display: inline-block;
width: 14px;
height: 14px;
background: url(../images/trgUp.png) 50% no-repeat;
}
.searchInput{ .searchInput{
padding: 3px; padding: 3px;
float: left; float: left;
@ -185,23 +159,6 @@ a {
vertical-align: top; vertical-align: top;
} }
.resultFooter{
float: left;
margin: 5px;
padding: 3px;
width: 100%;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-weight: bold;
font-size: x-large;
text-align: center;
}
#branding{
position: absolute;
top: 0;
left: 0;
z-index: 2;
}
.filterContainer{ .filterContainer{
float: left; float: left;
@ -356,18 +313,3 @@ input[type="radio"]:checked + .filter_button.button.color {
background-color: gray; background-color: gray;
color: white; color: white;
} }
/*
Planete Sankore Changes
*/
.searchButton{
right: 10px;
}
#subSearchInput{
padding-right: 5px;
}
.imgContainer img {
width: 100px;
}

@ -19,17 +19,18 @@
function addPaginationLinks(totalResults) { function addPaginationLinks(totalResults) {
var curPage = currentIndex; // check what page the app is on var curPage = currentIndex; // check what page the app is on
var pagesDiv = $("<div id='resultFooter' class='resultFooter'>"); var pagesDiv = $("<div id='resultFooter' class='resultFooter'>");
for (var i = 0; i < 10; i++) { for (var i = 0; i < 8; i++) {
if (i * limit < totalResults) { if (i * limit < totalResults) {
var link = $("<a class='pager_button'></a>").attr('href', 'javascript:gotoPage('+i+');').html(i).appendTo(pagesDiv); var link = $("<a class='pager_button'></a>").attr('href', 'javascript:gotoPage('+i+');').html(i+1).appendTo(pagesDiv);
if (curPage == i) { if (curPage == i) {
link.addClass('active'); link.addClass('active');
} }
} }
} }
pagesDiv.appendTo($('#searchResult')); $("#disc_nav_cont #resultFooter").remove();
pagesDiv.insertBefore($('#disclaimer'));
$(".imgContainer").each(function(){ $(".imgContainer").each(function(){
this.addEventListener("dragstart", imageDragging, false); this.addEventListener("dragstart", imageDragging, false);
@ -128,7 +129,8 @@
var hide = false; //hide or no main panel var hide = false; //hide or no main panel
//basic containers and elements //basic containers and elements
var disclaimer = $("<div id='disclaimer' class='disclaimer'>Recherche de documents vidéo sur Planète Sankoré</div>").appendTo("body"); var disc_nav_cont = $("<div id='disc_nav_cont' class='disc_nav_cont'>").appendTo("body");
var disclaimer = $("<div id='disclaimer' class='disclaimer'>Recherche de documents vidéo sur Planète Sankoré<div>").appendTo(disc_nav_cont);
var search = $("<div id='search' class='search'>").appendTo("body"); var search = $("<div id='search' class='search'>").appendTo("body");
var togglePages = $("<div id='togglePages' class='togglePages'>").appendTo(search); var togglePages = $("<div id='togglePages' class='togglePages'>").appendTo(search);
@ -165,7 +167,7 @@
}); });
*/ */
togglePages.click(function(event){ /*togglePages.click(function(event){
if(mode){ if(mode){
hide = false; hide = false;
$("#search, #disclaimer").slideDown('slow', function(){ $("#search, #disclaimer").slideDown('slow', function(){
@ -181,12 +183,12 @@
}); });
mode = true; mode = true;
} }
}); });*/
searchButton.click(function(){ searchButton.click(function(){
if(!hide){ if(!hide){
runSearch(searchInput.val(), 0); runSearch(searchInput.val(), 0);
togglePages.trigger("click"); //togglePages.trigger("click");
} }
}); });
@ -194,7 +196,7 @@
if(!hide){ if(!hide){
if((event.keyCode == 0xA)||(event.keyCode == 0xD)){ if((event.keyCode == 0xA)||(event.keyCode == 0xD)){
runSearch(searchInput.val(), 0); runSearch(searchInput.val(), 0);
togglePages.trigger("click"); //togglePages.trigger("click");
} }
} }
@ -204,11 +206,11 @@
sankore.sendFileMetadata(createMetaData($(this))); sankore.sendFileMetadata(createMetaData($(this)));
})); }));
$(window).resize(function(){ /*$(window).resize(function(){
disclaimer.width($("body").width()-20); disclaimer.width($("body").width()-20);
search.width($("body").width()-20); search.width($("body").width()-20);
toggleIcon.css("margin-left",(togglePages.width()/2 - 7)); toggleIcon.css("margin-left",(togglePages.width()/2 - 7));
}) })*/
}); });
@ -250,7 +252,6 @@
</head> </head>
<body style="font-family: Arial;border: 0 none;"> <body style="font-family: Arial;border: 0 none;">
<div id="branding" style="float: left;"></div><br />
<div id="searchResult"></div> <div id="searchResult"></div>
</body> </body>
</html> </html>

Loading…
Cancel
Save