new version of google image widget

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent cbbac4e0e9
commit 322daf9461
  1. 0
      resources/library/search/Google images.wgs/config.xml
  2. 206
      resources/library/search/Google images.wgs/css/basic.css
  3. 0
      resources/library/search/Google images.wgs/icon.png
  4. 0
      resources/library/search/Google images.wgs/icon.thumbnail.png
  5. 0
      resources/library/search/Google images.wgs/images/down.png
  6. 0
      resources/library/search/Google images.wgs/images/greySquare.png
  7. 0
      resources/library/search/Google images.wgs/images/icon-close.png
  8. 0
      resources/library/search/Google images.wgs/images/popupBack.png
  9. 0
      resources/library/search/Google images.wgs/images/search.png
  10. BIN
      resources/library/search/Google images.wgs/images/search_app.png
  11. 0
      resources/library/search/Google images.wgs/images/trgDown.png
  12. 0
      resources/library/search/Google images.wgs/images/trgUp.png
  13. 0
      resources/library/search/Google images.wgs/images/up.png
  14. 217
      resources/library/search/Google images.wgs/index.html
  15. 74
      resources/library/search/Google images.wgs/locales/locales.js
  16. 0
      resources/library/search/Google images.wgs/scripts/jquery-1.6.2.min.js
  17. BIN
      resources/library/search/Google images.wgs/select/jquery.selectBox-arrow.gif
  18. 150
      resources/library/search/Google images.wgs/select/jquery.selectBox.css
  19. 2
      resources/library/search/Google images.wgs/select/jquery.selectBox.min.js

@ -1,4 +1,4 @@
body{ html, body{
width: 100%; width: 100%;
padding: 0; padding: 0;
height: auto; height: auto;
@ -6,10 +6,13 @@ body{
margin: 0; margin: 0;
} }
a {
text-decoration: none;
}
.disclaimer{ .disclaimer{
width: 90%; height: 30px;
height: 50px; position: fixed;
position: absolute;
left: 0; left: 0;
bottom: 0; bottom: 0;
margin-left: 1px; margin-left: 1px;
@ -27,14 +30,16 @@ body{
z-index: 10; z-index: 10;
} }
#searchResult {
overflow: hidden;
text-align: center;
}
.search{ .search{
width: 90%; width: 90%;
position: absolute; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
margin-left: 1px;
margin-right: 1px;
margin-top: 0px;
padding: 5px; padding: 5px;
background-color: #BBBBBB; background-color: #BBBBBB;
-webkit-border-bottom-left-radius: 15px; -webkit-border-bottom-left-radius: 15px;
@ -46,47 +51,62 @@ body{
z-index: 101; z-index: 101;
} }
.search,
.disclaimer {
width: 100%;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.togglePages{ .togglePages{
padding: 0; padding: 0;
position: absolute; position: absolute;
bottom: -14px; bottom: -19px;
left: 43%; left: 40%;
width: 15%; width: 22%;
height: 10px; height: 15px;
background-color: #666; background-color: #666;
-webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-left-radius: 20px;
-webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-right-radius: 20px;
border-bottom-left-radius: 5px; border-bottom-left-radius: 20px;
border-bottom-right-radius: 5px; border-bottom-right-radius: 20px;
-webkit-box-shadow: #dadada -1px 0 4px; -webkit-box-shadow: #dadada -1px 0 4px;
box-shadow: #dadada -1px 0 4px; box-shadow: #dadada -1px 0 4px;
cursor: pointer; cursor: pointer;
z-index: 100; z-index: 100;
text-align: center;
} }
.toggleIcon{ .toggleIcon{
display: inline-block;
width: 14px; width: 14px;
height: 10px; height: 14px;
background-image: url(../images/trgUp.png); background: url(../images/trgUp.png) 50% no-repeat;
} }
.searchInput{ .searchInput{
margin: 10px 5px 10px 5px; padding: 3px;
padding: 2px;
padding-left: 8px;
padding-right:8px;
float: left; float: left;
width: 60%; width: 100%;
border-radius: 15px; border-radius: 3px;
border-style: none; border-style: none;
height: 22px;
line-height: 18px;
vertical-align: middle;
box-sizing: border-box;
-webkit-box-sizing: border-box;
} }
.searchButton{ .searchButton{
width: 32px; background: url("../images/search_app.png") -38px -38px no-repeat;
height: 32px; width: 24px;
margin: 5px 5px; height: 24px;
background-image: url(../images/search.png); overflow: hidden;
float: left; position: absolute;
right: 30px;
top: 9px;
margin-left: -2px;
cursor: pointer; cursor: pointer;
} }
@ -98,6 +118,10 @@ body{
#subSearchInput{ #subSearchInput{
width: 100%; width: 100%;
float: left; float: left;
box-sizing: border-box;
-webkit-box-sizing: border-box;
padding: 5px;
padding-right: 26px;
} }
#subSearchFilter{ #subSearchFilter{
@ -113,7 +137,7 @@ body{
} }
.imgContainer{ .imgContainer{
float: left; display: inline-block;
padding: 3px; padding: 3px;
margin: 3px; margin: 3px;
text-align: center; text-align: center;
@ -125,6 +149,7 @@ body{
-webkit-box-shadow: #dadada -1px 0 4px; -webkit-box-shadow: #dadada -1px 0 4px;
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
box-shadow: #666 -1px 0 4px; box-shadow: #666 -1px 0 4px;
vertical-align: top;
} }
.resultFooter{ .resultFooter{
@ -135,12 +160,13 @@ body{
font-family: Verdana,Arial,Helvetica,sans-serif; font-family: Verdana,Arial,Helvetica,sans-serif;
font-weight: bold; font-weight: bold;
font-size: x-large; font-size: x-large;
text-align: center;
} }
#branding{ #branding{
position: absolute; position: absolute;
top: 0; top: 0;
left: 10px; left: 0;
z-index: 2; z-index: 2;
} }
@ -159,6 +185,8 @@ body{
-moz-border-radius-topright: 15px; -moz-border-radius-topright: 15px;
-moz-border-radius-bottomright: 15px; -moz-border-radius-bottomright: 15px;
border-top-right-radius: 15px; border-top-right-radius: 15px;
margin-top: 2px;
width: 100%;
} }
span{ span{
@ -177,9 +205,121 @@ span{
background-position: center; background-position: center;
background-image: url(../images/down.png); background-image: url(../images/down.png);
position: absolute; position: absolute;
bottom: 2px; top: 11px;
right: 2px; right: 6px;
width: 20px; width: 20px;
height: 20px; height: 20px;
cursor: pointer; cursor: pointer;
}
.colors_line {
float: left;
margin: 4px;
margin-right: 0;
clear: left;
}
.custom {
opacity: 0;
position: absolute;
left: -10000px;
}
.filter_button.button.color {
display: inline-block;
width: 15px;
height: 15px;
border: 1px solid #EBEBEB;
padding: 0;
margin: 0;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.filter_button.button.color:hover {
border: 1px solid rgb(128,128,128);
cursor: pointer;
}
input[type="radio"]:checked + .filter_button.button.color {
border: 1px solid rgb(255,255,255);
box-shadow: 0 0 0px 1px #000;
-webkit-box-shadow: 0 0 0px 1px #000;
}
#allcolor {
background: white url('../images/search_app.png') -43px -144px no-repeat;
}
#colored {
background: white url('../images/search_app.png') -43px -244px no-repeat;
}
#grayed {
background: white url('../images/search_app.png') -45px -343px no-repeat;
}
#black{
background-color:#ffffff;
}
#blue{
background-color:#0000FF;
}
#brown{
background-color:rgba(139, 82, 16, 1);
}
#gray{
background-color:#999999;
}
#green{
background-color:#00CC00;
}
#orange{
background-color:#FB940B;
}
#pink{
background-color:#FF98BF;
}
#purple{
background-color:#762CA7;
}
#red{
background-color:#CC0000;
}
#teal{
background-color:#03C0C6;
}
#white{
background-color:#000000;
}
#yellow{
background-color:#FFFF00;
}
.selectBox-dropdown, .selectBox-options li a {
line-height: 1.3 !important;
font-size: 13px;
}
.pager_button {
padding: 3px 5px;
font-size: 16px;
color: black;
display: inline-block;
}
.pager_button.active {
border-radius: 3px;
-webkit-border-radius: 3px;
background-color: gray;
color: white;
} }

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 214 B

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before

Width:  |  Height:  |  Size: 931 B

After

Width:  |  Height:  |  Size: 931 B

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 475 B

After

Width:  |  Height:  |  Size: 475 B

Before

Width:  |  Height:  |  Size: 448 B

After

Width:  |  Height:  |  Size: 448 B

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -3,10 +3,12 @@
<head> <head>
<title>Google Image Search</title> <title>Google Image Search</title>
<link rel="stylesheet" type="text/css" href="css/basic.css"/> <link rel="stylesheet" type="text/css" href="css/basic.css"/>
<script type="text/javascript" src="locales/locales.js"></script>
<script type="text/javascript" src="http://www.google.com/uds"></script> <script type="text/javascript" src="http://www.google.com/uds"></script>
<script type="text/javascript" src="scripts/jquery-1.6.2.min.js"></script> <script type="text/javascript" src="scripts/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="select/jquery.selectBox.min.js"></script>
<link type="text/css" rel="stylesheet" href="select/jquery.selectBox.css" />
<script type="text/javascript"> <script type="text/javascript">
//begin google API //begin google API
google.load("search","1"); google.load("search","1");
@ -23,19 +25,10 @@
var pagesDiv = $("<div id='resultFooter' class='resultFooter'>"); var pagesDiv = $("<div id='resultFooter' class='resultFooter'>");
for (var i = 0; i < cursor.pages.length; i++) { for (var i = 0; i < cursor.pages.length; i++) {
var page = cursor.pages[i]; var page = cursor.pages[i];
if (curPage == i) {
// If we are on the current page, then don't make a link.
var label = document.createTextNode(' ' + page.label + ' ');
pagesDiv.append($(label));
} else {
// Create links to other pages using gotoPage() on the searcher. var link = $("<a class='pager_button'></a>").attr('href', 'javascript:imageSearch.gotoPage('+i+');').html(page.label).appendTo(pagesDiv);
var link = document.createElement('a'); if (curPage == i) {
link.href = 'javascript:imageSearch.gotoPage('+i+');'; link.addClass('active');
link.innerHTML = page.label;
link.style.marginRight = '2px';
pagesDiv.append($(link));
} }
} }
@ -59,7 +52,6 @@
} }
function searchComplete() { function searchComplete() {
// Check that we got results // Check that we got results
if (imageSearch.results && imageSearch.results.length > 0) { if (imageSearch.results && imageSearch.results.length > 0) {
@ -68,6 +60,7 @@
// Loop through our results, printing them to the page. // Loop through our results, printing them to the page.
var results = imageSearch.results; var results = imageSearch.results;
console.log(results);
for (var i = 0; i < results.length; i++) { for (var i = 0; i < results.length; i++) {
// 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];
@ -109,6 +102,10 @@
// Now add links to additional pages of search results. // Now add links to additional pages of search results.
addPaginationLinks(imageSearch); addPaginationLinks(imageSearch);
} }
setTimeout(function(){
$(window).trigger('resize');
}, 1000);
} }
function OnLoad() { function OnLoad() {
@ -157,26 +154,17 @@
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 lang = ""; //locale language var lang = window.sankore ? sankore.locale().substr(0,2) : "en"; //locale language
var disclaimer;
if(window.sankore){ //localization
lang = sankore.locale().substr(0,2); locale = locales[lang];
lang = "fr";
if(lang == "en"){ var disclaimer = $("<div id='disclaimer' class='disclaimer'>"+locale.disclaimer_title+"<div>").appendTo("body");
disclaimer = $("<div id='disclaimer' class='disclaimer'>EN<div>").appendTo("body");
}
else{
disclaimer = $("<div id='disclaimer' class='disclaimer'>FR<div>").appendTo("body");
}
}
var search = $("<div id='search' class='search'>").appendTo("body"); var search = $("<div id='search' class='search'>").appendTo("body");
disclaimer.width($("body").width()-20);
search.width($("body").width()-20);
var togglePages = $("<div id='togglePages' class='togglePages'>").appendTo(search); var togglePages = $("<div id='togglePages' class='togglePages'>").appendTo(search);
var toggleIcon = $("<div id='toggleIcon' class='toggleIcon'>").appendTo(togglePages).css("margin-left",(togglePages.width()/2 - 7)); var toggleIcon = $("<div id='toggleIcon' class='toggleIcon'>").appendTo(togglePages);
var subSearchInput = $("<div id='subSearchInput' class='subSearch'>").appendTo(search); var subSearchInput = $("<div id='subSearchInput' class='subSearch'>").appendTo(search);
var subSearchFilter = $("<div id='subSearchFilter' class='subSearch'>").appendTo(search); var subSearchFilter = $("<div id='subSearchFilter' class='subSearch'>").appendTo(search);
@ -187,58 +175,70 @@
//adding filters to the wgt //adding filters to the wgt
var selectFilter = $("<select id='sizeFilter' class='filterSelect'>") var selectFilter = $("<select id='sizeFilter' class='filterSelect'>")
.append($("<option value='0'>Any</option>")) .append($("<option value='0'>"+locale.def_opts_val+"</option>"))
.append($("<option value='1'>Small</option>")) .append($("<option value='1'>"+locale.size_small+"</option>"))
.append($("<option value='2'>Medium</option>")) .append($("<option value='2'>"+locale.size_medium+"</option>"))
.append($("<option value='3'>Large</option>")) .append($("<option value='3'>"+locale.size_large+"</option>"))
.append($("<option value='4'>Extra large</option>")); .append($("<option value='4'>"+locale.size_extra_large+"</option>"));
$("<div class='filterContainer'>").append("<span>Size:</span>").append(selectFilter).appendTo(subSearchFilter); $("<div class='filterContainer'>").append("<span>"+locale.size_title+":</span><br/>").append(selectFilter).appendTo(subSearchFilter);
selectFilter = $("<select id='colorizFilter' class='filterSelect'>")
.append($("<option value='0'>Any</option>"))
.append($("<option value='1'>Grayscale</option>"))
.append($("<option value='2'>Color</option>"));
$("<div class='filterContainer'>").append("<span>Colorization:</span>").append(selectFilter).appendTo(subSearchFilter);
selectFilter = $("<select id='colorFilter' class='filterSelect'>")
.append($("<option value='0'>Any</option>"))
.append($("<option value='1'>Black</option>"))
.append($("<option value='2'>Blue</option>"))
.append($("<option value='3'>Brown</option>"))
.append($("<option value='4'>Gray</option>"))
.append($("<option value='5'>Green</option>"))
.append($("<option value='6'>Orange</option>"))
.append($("<option value='7'>Pink</option>"))
.append($("<option value='8'>Purple</option>"))
.append($("<option value='9'>Red</option>"))
.append($("<option value='10'>Teal</option>"))
.append($("<option value='11'>White</option>"))
.append($("<option value='12'>Yellow</option>"));
$("<div class='filterContainer'>").append("<span>Main color:</span>").append(selectFilter).appendTo(subSearchFilter);
selectFilter = $("<select id='fileTypeFilter' class='filterSelect'>") selectFilter = $("<select id='fileTypeFilter' class='filterSelect'>")
.append($("<option value='0'>Any</option>")) .append($("<option value='0'>"+locale.def_opts_val+"</option>"))
.append($("<option value='1'>*.JPG</option>")) .append($("<option value='1'>*.JPG</option>"))
.append($("<option value='2'>*.PNG</option>")) .append($("<option value='2'>*.PNG</option>"))
.append($("<option value='3'>*.GIF</option>")) .append($("<option value='3'>*.GIF</option>"))
.append($("<option value='4'>*.BMP</option>")); .append($("<option value='4'>*.BMP</option>"));
$("<div class='filterContainer'>").append("<span>File type:</span>").append(selectFilter).appendTo(subSearchFilter); $("<div class='filterContainer'>").append("<span>"+locale.file_type_title+":</span><br/>").append(selectFilter).appendTo(subSearchFilter);
selectFilter = $("<select id='typeFilter' class='filterSelect'>") selectFilter = $("<select id='typeFilter' class='filterSelect'>")
.append($("<option value='0'>Any</option>")) .append($("<option value='0'>"+locale.def_opts_val+"</option>"))
.append($("<option value='1'>Faces</option>")) .append($("<option value='1'>"+locale.image_type_faces+"</option>"))
.append($("<option value='2'>Photo</option>")) .append($("<option value='2'>"+locale.image_type_photo+"</option>"))
.append($("<option value='3'>Clipart</option>")) .append($("<option value='3'>"+locale.image_type_clipart+"</option>"))
.append($("<option value='4'>Lineart</option>")); .append($("<option value='4'>"+locale.image_type_lineart+"</option>"));
$("<div class='filterContainer'>").append("<span>Image type:</span>").append(selectFilter).appendTo(subSearchFilter); $("<div class='filterContainer'>").append("<span>"+locale.image_type_title+":</span><br/>").append(selectFilter).appendTo(subSearchFilter);
selectFilter = $("<select id='rightsFilter' class='filterSelect'>") selectFilter = $("<select id='rightsFilter' class='filterSelect'>")
.append($("<option value='0'>Any</option>")) .append($("<option value='0'>"+locale.def_opts_val+"</option>"))
.append($("<option value='1'>Reuse</option>")) .append($("<option value='1'>"+locale.image_license_reuse+"</option>"))
.append($("<option value='2'>Comercial reuse</option>")) .append($("<option value='2'>"+locale.image_license_comm_reuse+"</option>"))
.append($("<option value='3'>Modification</option>")) .append($("<option value='3'>"+locale.image_license_modif+"</option>"))
.append($("<option value='4'>Comercial modification</option>")); .append($("<option value='4'>"+locale.image_license_comm_modif+"</option>"));
$("<div class='filterContainer'>").append("<span>Image type:</span>").append(selectFilter).appendTo(subSearchFilter); $("<div class='filterContainer'>").append("<span>"+locale.image_type_title+":</span><br/>").append(selectFilter).appendTo(subSearchFilter);
var colors_line = $('<div class="colors_line"></div>');
subSearchFilter.append(colors_line);
colors_line.html('<input type="radio" value="allcolor" id="color_shem_allcolor" class="custom" name="color" checked="true">\
<label id="allcolor" class="filter_button button color active" for="color_shem_allcolor"></label>\
<input type="radio" value="color" id="color_shem_color" class="custom" name="color">\
<label id="colored" class="filter_button button color" for="color_shem_color"></label>\
<input type="radio" value="grayscale" id="color_shem_gray" class="custom" name="color">\
<label id="grayed" class="filter_button button color" for="color_shem_gray"></label>\
<label style="border-right: 1px solid #fff; margin-right:7px; margin-left:7px; height: 15px; display: inline-block;"></label>\
<input type="radio" value="red" id="design9" class="custom" name="color">\
<label id="red" class="filter_button button color" for="design9"></label>\
<input type="radio" value="orange" id="design6" class="custom" name="color">\
<label id="orange" class="filter_button button color" for="design6"></label>\
<input type="radio" value="yellow" id="design12" class="custom" name="color">\
<label id="yellow" class="filter_button button color" for="design12"></label>\
<input type="radio" value="green" id="design5" class="custom" name="color">\
<label id="green" class="filter_button button color" for="design5"></label>\
<input type="radio" value="teal" id="design10" class="custom" name="color">\
<label id="teal" class="filter_button button color" for="design10"></label>\
<input type="radio" value="blue" id="design2" class="custom" name="color">\
<label id="blue" class="filter_button button color" for="design2"></label>\
<input type="radio" value="purple" id="design8" class="custom" name="color">\
<label id="purple" class="filter_button button color" for="design8"></label>\
<input type="radio" value="pink" id="design7" class="custom" name="color">\
<label id="pink" class="filter_button button color" for="design7"></label>\
<input type="radio" value="white" id="design11" class="custom" name="color">\
<label id="white" class="filter_button button color" for="design11"></label>\
<input type="radio" value="gray" id="design4" class="custom" name="color">\
<label id="gray" class="filter_button button color" for="design4"></label>\
<input type="radio" value="black" id="design1" class="custom" name="color">\
<label id="black" class="filter_button button color" for="design1"></label>\
<input type="radio" value="brown" id="design3" class="custom" name="color">\
<label id="brown" class="filter_button button color" for="design3"></label>');
//mouse click actions //mouse click actions
toggleFilters.click(function(){ toggleFilters.click(function(){
@ -256,14 +256,14 @@
togglePages.click(function(event){ togglePages.click(function(event){
if(mode){ if(mode){
hide = false; hide = false;
$("#search, #disclaimer").slideDown('slow', function(){ $("#search, #disclaimer").slideDown('fast', function(){
toggleIcon.css("background-image","url(images/trgUp.png)"); toggleIcon.css("background-image","url(images/trgUp.png)");
togglePages.appendTo("#search").css("top","").css("bottom","-14px"); togglePages.appendTo("#search").css("top","").css("bottom","-14px");
}); });
mode = false; mode = false;
} else { } else {
hide = true; hide = true;
$("#search, #disclaimer").slideUp('slow', function(){ $("#search, #disclaimer").slideUp('fast', function(){
toggleIcon.css("background-image","url(images/trgDown.png)"); toggleIcon.css("background-image","url(images/trgDown.png)");
togglePages.appendTo("body").css("top","0"); togglePages.appendTo("body").css("top","0");
}); });
@ -287,11 +287,14 @@
} }
}); });
(
$('.filterSelect, .colors_line input[name=color]').change(function(){
checkFilters(imageSearch).execute(searchInput.val());
});
$(".imgContainer").live("click",function(){ $(".imgContainer").live("click",function(){
//alert(createMetaData($(this)));
sankore.sendFileMetadata(createMetaData($(this))); sankore.sendFileMetadata(createMetaData($(this)));
})); });
//checking filters //checking filters
function checkFilters(imgSearch){ function checkFilters(imgSearch){
@ -314,58 +317,53 @@
break; break;
} }
value = $("#colorizFilter option:selected").val(); value = $(".colors_line input[name=color]:checked").val();
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,null);
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORIZATION,null);
switch(value){ switch(value){
case "0": case "allcolor":
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORIZATION,null); imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORIZATION,null);
break; break;
case "1": case "grayscale":
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORIZATION,google.search.ImageSearch.COLORIZATION_GRAYSCALE); imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORIZATION,google.search.ImageSearch.COLORIZATION_GRAYSCALE);
break; break;
case "2": case "color":
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORIZATION,google.search.ImageSearch.COLORIZATION_COLOR); imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORIZATION,google.search.ImageSearch.COLORIZATION_COLOR);
break; break;
} case "black":
value = $("#colorFilter option:selected").val();
switch(value){
case "0":
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,null);
break;
case "1":
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_BLACK); imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_BLACK);
break; break;
case "2": case "blue":
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_BLUE); imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_BLUE);
break; break;
case "3": case "brown":
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_BROWN); imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_BROWN);
break; break;
case "4": case "gray":
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_GRAY); imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_GRAY);
break; break;
case "5": case "green":
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_GREEN); imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_GREEN);
break; break;
case "6": case "orange":
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_ORANGE); imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_ORANGE);
break; break;
case "7": case "pink":
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_PINK); imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_PINK);
break; break;
case "8": case "purple":
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_PURPLE); imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_PURPLE);
break; break;
case "9": case "red":
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_RED); imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_RED);
break; break;
case "10": case "teal":
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_TEAL); imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_TEAL);
break; break;
case "11": case "white":
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_WHITE); imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_WHITE);
break; break;
case "12": case "yellow":
imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_YELLOW); imgSearch.setRestriction(google.search.ImageSearch.RESTRICT_COLORFILTER,google.search.ImageSearch.COLOR_YELLOW);
break; break;
} }
@ -429,19 +427,26 @@
return imgSearch; return imgSearch;
} }
$(window).resize(function(){ $(window).resize(function(){
disclaimer.width($("body").width()-20); var width = "200px";
search.width($("body").width()-20); if ($('#search').width() < 230) {
toggleIcon.css("margin-left",(togglePages.width()/2 - 7)); width = $("#search").width()-40;
}) } else {
width = "200px";
}
$('select').selectBox('destroy').css('width', width).selectBox();
});
$(window).trigger("resize");
}); });
function createMetaData(parent){ function createMetaData(parent){
var meta = ""; var meta = "";
//alert($(this).find("input:hidden").eq(0).val());
meta = "<metadata><data><key>Type</key><value>Image</value></data><data><key>Url</key><value>" + meta = "<metadata><data><key>Type</key><value>Image</value></data><data><key>Url</key><value>" +
parent.find("input:hidden").eq(0).val() + parent.find("input:hidden").eq(0).val() +
"</value></data><data><key>thumbnailUrl</key><value>" +
parent.find("img").attr("src") +
"</value></data><data><key>Content</key><value>" + "</value></data><data><key>Content</key><value>" +
parent.find("input:hidden").eq(1).val() + parent.find("input:hidden").eq(1).val() +
"</value></data><data><key>Height</key><value>" + "</value></data><data><key>Height</key><value>" +

@ -0,0 +1,74 @@
var locales = {
'en': {
'def_opts_val': 'Any',
'size_title': 'Size',
'size_small': 'Small',
'size_medium': 'Medium',
'size_large': 'Large',
'size_extra_large': 'Extra large',
'colorization_title': 'Colorization',
'coloriz_grayscale': 'Grayscale',
'coloriz_color': 'Color',
'main_color_title': 'Main color',
'm_color_black': 'Black',
'm_color_blue': 'Blue',
'm_color_brown': 'Brown',
'm_color_gray': 'Gray',
'm_color_green': 'Green',
'm_color_orange': 'Orange',
'm_color_pink': 'Pink',
'm_color_purple': 'Purple',
'm_color_red': 'Red',
'm_color_teal': 'Teal',
'm_color_white': 'White',
'm_color_yellow': 'Yellow',
'file_type_title': 'File type',
'image_type_title': 'Image type',
'image_type_faces': 'Faces',
'image_type_photo': 'Photo',
'image_type_clipart': 'Clipart',
'image_type_lineart': 'Lineart',
'image_license_title': 'Image type',
'image_license_reuse': 'Reuse',
'image_license_comm_reuse': 'Commercial reuse',
'image_license_modif': 'Modification',
'image_license_comm_modif': 'Commercial modification',
'disclaimer_title': 'Disclaimer'
},
'fr': {
'def_opts_val': 'Tout',
'size_title': 'Taille',
'size_small': 'Petit',
'size_medium': 'Moyen',
'size_large': 'Grand',
'size_extra_large': 'Extra large',
'colorization_title': 'Colorisation',
'coloriz_grayscale': 'Niveaux de gris',
'coloriz_color': 'Couleur',
'main_color_title': 'Couleur électronique',
'm_color_black': 'Noir',
'm_color_blue': 'Bleu',
'm_color_brown': 'Brun',
'm_color_gray': 'Gris',
'm_color_green': 'Vert',
'm_color_orange': 'Orange',
'm_color_pink': 'Rose',
'm_color_purple': 'Pourpre',
'm_color_red': 'Rouge',
'm_color_teal': 'Sarcelle',
'm_color_white': 'Blanc',
'm_color_yellow': 'Jaune',
'file_type_title': 'Type de fichier',
'image_type_title': 'Type d\'image',
'image_type_faces': 'Visages',
'image_type_photo': 'Photo',
'image_type_clipart': 'Des cliparts',
'image_type_lineart': 'Lineart',
'image_license_title': 'Type d\'image',
'image_license_reuse': 'Réutilisation',
'image_license_comm_reuse': 'La réutilisation commerciale',
'image_license_modif': 'Modification',
'image_license_comm_modif': 'Modification de commerce',
'disclaimer_title': 'Désistement'
}
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 B

@ -0,0 +1,150 @@
/* Dropdown control */
.selectBox-dropdown {
min-width: 60px;
position: relative;
/*border: solid 1px #BBB;*/
line-height: 1.5;
text-decoration: none;
text-align: left;
color: #000;
outline: none;
vertical-align: middle;
background: #F2F2F2;
background: -moz-linear-gradient(top, #F8F8F8 1%, #E1E1E1 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(1%, #F8F8F8), color-stop(100%, #E1E1E1));
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F8F8F8', endColorstr='#E1E1E1', GradientType=0);
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, .75);
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, .75);
box-shadow: 0 1px 0 rgba(255, 255, 255, .75);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
display: inline-block;
cursor: default;
}
.selectBox-dropdown:focus,
.selectBox-dropdown:focus .selectBox-arrow {
border-color: #666;
}
.selectBox-dropdown.selectBox-menuShowing {
-moz-border-radius-bottomleft: 0;
-moz-border-radius-bottomright: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.selectBox-dropdown .selectBox-label {
padding: 2px 8px;
display: inline-block;
white-space: nowrap;
overflow: hidden;
}
.selectBox-dropdown .selectBox-arrow {
position: absolute;
top: 0;
right: 0;
width: 23px;
height: 100%;
background: url(jquery.selectBox-arrow.gif) 50% center no-repeat;
border-left: solid 1px #BBB;
}
/* Dropdown menu */
.selectBox-dropdown-menu {
position: absolute;
z-index: 99999;
max-height: 200px;
min-height: 1em;
border: solid 1px #BBB; /* should be the same border width as .selectBox-dropdown */
background: #FFF;
-moz-box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
-webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
overflow: auto;
}
/* Inline control */
.selectBox-inline {
min-width: 150px;
outline: none;
border: solid 1px #BBB;
background: #FFF;
display: inline-block;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
overflow: auto;
}
.selectBox-inline:focus {
border-color: #666;
}
/* Options */
.selectBox-options,
.selectBox-options LI,
.selectBox-options LI A {
list-style: none;
display: block;
cursor: default;
padding: 0;
margin: 0;
}
.selectBox-options LI A {
line-height: 1.5;
padding: 0 .5em;
white-space: nowrap;
overflow: hidden;
background: 6px center no-repeat;
}
.selectBox-options LI.selectBox-hover A {
background-color: #EEE;
}
.selectBox-options LI.selectBox-disabled A {
color: #888;
background-color: transparent;
}
.selectBox-options LI.selectBox-selected A {
background-color: #C8DEF4;
}
.selectBox-options .selectBox-optgroup {
color: #666;
background: #EEE;
font-weight: bold;
line-height: 1.5;
padding: 0 .3em;
white-space: nowrap;
}
/* Disabled state */
.selectBox.selectBox-disabled {
color: #888 !important;
}
.selectBox-dropdown.selectBox-disabled .selectBox-arrow {
opacity: .5;
filter: alpha(opacity=50);
border-color: #666;
}
.selectBox-inline.selectBox-disabled {
color: #888 !important;
}
.selectBox-inline.selectBox-disabled .selectBox-options A {
background-color: transparent !important;
}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save