From 0bd4844fc8724ef0e05f92a8c9d790a6c8703187 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Jul 2012 14:27:12 +0200 Subject: [PATCH] fixed google image search --- .../search/Google images.wgs/config.xml | 2 +- .../search/Google images.wgs/css/basic.css | 422 +----------------- .../search/Google images.wgs/index.html | 21 +- 3 files changed, 23 insertions(+), 422 deletions(-) diff --git a/resources/library/search/Google images.wgs/config.xml b/resources/library/search/Google images.wgs/config.xml index d7cc14eb..26cc8c6d 100644 --- a/resources/library/search/Google images.wgs/config.xml +++ b/resources/library/search/Google images.wgs/config.xml @@ -10,7 +10,7 @@ Choisir Mnemis SA - Choisir widget + Google Image Search diff --git a/resources/library/search/Google images.wgs/css/basic.css b/resources/library/search/Google images.wgs/css/basic.css index bd9ad569..72a724cd 100644 --- a/resources/library/search/Google images.wgs/css/basic.css +++ b/resources/library/search/Google images.wgs/css/basic.css @@ -6,15 +6,6 @@ html, body{ margin: 0; } -a {html, body{ - width: 100%; - padding: 0; - height: auto; - background-color: white; - margin: 0; -} - - ::-webkit-scrollbar { width: 14px; background-color:white; @@ -48,49 +39,36 @@ a {html, body{ } a { - text-decoration: none; + text-decoration: underline; } .disclaimer{ height: auto; position: fixed; left: 0; - bottom: 0; - margin-left: 1px; - margin-right: 1px; - margin-bottom: 0px; + bottom: 0; padding: 5px; text-align: center; - background-color: #BBBBBB; - -webkit-border-top-left-radius: 15px; - -webkit-border-top-right-radius: 15px; - border-top-left-radius: 15px; - border-top-right-radius: 15px; - border: solid 4px #EEEEEE; + background-color: #BBBBBB; + border-top: solid 4px #EEEEEE; border-bottom: none; - z-index: 10; font-size: 12px; } #searchResult { overflow: hidden; text-align: center; + margin-top: 50px; + margin-bottom: 50px; } -.search{ - width: 90%; +.search{ position: fixed; top: 0; left: 0; padding: 5px; background-color: #BBBBBB; - -webkit-border-bottom-left-radius: 15px; - -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; + border-bottom: solid 4px #EEEEEE; } .search, @@ -100,25 +78,6 @@ a { -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; @@ -175,6 +134,7 @@ a { .searchResult{ width: 98%; padding: 3px; + background-color:#123456; } @@ -186,367 +146,13 @@ a { overflow: hidden; font-size: small; 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; } .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{ - float: left; - margin: 2px; - padding: 2px; - font-size: 14px; - -} - -.filterSelect{ - border-style:none; - -webkit-border-top-right-radius: 15px; - -webkit-border-bottom-right-radius: 15px; - -moz-border-radius-topright: 15px; - -moz-border-radius-bottomright: 15px; - border-top-right-radius: 15px; - margin-top: 2px; - width: 100%; -} - -span{ - font-family: Verdana,Arial,Helvetica,sans-serif; - color: #666; -} - -[draggable] { - -webkit-user-select: none; - user-select: none; -} - -.toggleFilters{ - margin: 0; - padding: 0; - background-position: center; - background-image: url(../images/down.png); - position: absolute; - top: 11px; - right: 6px; - width: 20px; - height: 20px; - 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; -} - - - text-decoration: none; -} - -::-webkit-scrollbar { - width: 14px; - background-color:white; -} - - -::-webkit-scrollbar-thumb { - border-radius: 10px; - background-color:lightgray; - border: 2px solid gray; -} - -::-webkit-scrollbar-button:vertical:start{ - border-radius: 10px; - background-color:lightgray; - background-image: url(../images/trgUp.png); - background-size: 8px auto; - background-position: center; - background-repeat: no-repeat; - border: 2px solid gray; -} - -::-webkit-scrollbar-button:vertical:end{ - border-radius: 10px; - background-color:lightgray; - background-image: url(../images/trgDown.png); - background-size: 8px auto; - background-position: center; - background-repeat: no-repeat; - border: 2px solid gray; -} - -.disclaimer{ - height: auto; - position: fixed; - left: 0; - bottom: 0; - margin-left: 1px; - margin-right: 1px; - margin-bottom: 0px; - padding: 5px; - text-align: center; - background-color: #BBBBBB; - -webkit-border-top-left-radius: 15px; - -webkit-border-top-right-radius: 15px; - border-top-left-radius: 15px; - border-top-right-radius: 15px; - border: solid 4px #EEEEEE; - border-bottom: none; - z-index: 10; - font-size: 12px; -} - -#searchResult { - overflow: hidden; - text-align: center; -} - -.search{ - width: 90%; position: fixed; - top: 0; left: 0; - padding: 5px; - background-color: #BBBBBB; - -webkit-border-bottom-left-radius: 15px; - -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, -.disclaimer { - width: 100%; - 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{ - padding: 3px; - float: left; - width: 100%; - border-radius: 3px; - border-style: none; - height: 22px; - line-height: 18px; - vertical-align: middle; - box-sizing: border-box; - -webkit-box-sizing: border-box; -} - -.searchButton{ - background: url("../images/search_app.png") -38px -38px no-repeat; - width: 24px; - height: 24px; - overflow: hidden; - position: absolute; - right: 30px; - top: 9px; - margin-left: -2px; - cursor: pointer; -} - -.subSearch{ - margin: 0; - float: left; -} - -#subSearchInput{ - width: 100%; - float: left; - box-sizing: border-box; - -webkit-box-sizing: border-box; - padding: 5px; - padding-right: 26px; -} - -#subSearchFilter{ - width: 100%; - float: left; - display: none; -} - -.searchResult{ - width: 98%; - padding: 3px; - background-color:#123456; -} - -.imgContainer{ - display: inline-block; - padding: 3px; - margin: 3px; - text-align: center; - overflow: hidden; - font-size: small; - 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; -} - -.resultFooter{ - float: left; + bottom: 50px; margin: 5px; padding: 3px; width: 100%; @@ -554,13 +160,7 @@ input[type="radio"]:checked + .filter_button.button.color { font-weight: bold; font-size: x-large; text-align: center; -} - -#branding{ - position: absolute; - top: 0; - left: 0; - z-index: 2; + background-color: white; } .filterContainer{ diff --git a/resources/library/search/Google images.wgs/index.html b/resources/library/search/Google images.wgs/index.html index 87e2409c..4fdc9dca 100644 --- a/resources/library/search/Google images.wgs/index.html +++ b/resources/library/search/Google images.wgs/index.html @@ -66,7 +66,7 @@ // For each result write it's title and image to the screen var result = results[i]; var imgContainer = $("
"); - var title = document.createElement('div'); + //var title = document.createElement('div'); var iUrl = $(""); var iContent = $(""); var iHeight = $(""); @@ -75,7 +75,7 @@ // We use titleNoFormatting so that no HTML tags are left in the // title - title.innerHTML = result.title; + //title.innerHTML = result.title; var newImg = document.createElement('img'); // There is also a result.url property which has the escaped version @@ -89,7 +89,7 @@ var imgHeight = (result.tbHeight > minHeight)?result.tbHeight:minHeight; imgContainer.width(imgWidth).height(imgHeight); imgContainer.append($(newImg)); - imgContainer.append($(title)); + //imgContainer.append($(title)); imgContainer.append(iUrl); imgContainer.append(iContent); imgContainer.append(iHeight); @@ -164,8 +164,8 @@ var search = $("