From 1f91c133e72a871af3599d406c530f8afe8f9924 Mon Sep 17 00:00:00 2001 From: Elio Gavlinski Date: Thu, 4 Sep 2014 22:08:14 -0300 Subject: [PATCH] =?UTF-8?q?Mudan=C3=A7a=20do=20tema=20Claro=20para=20Tundr?= =?UTF-8?q?a?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Alteradas as referências de claro.css para tundra.css. Troca na cor dos links. Ajustes de campos na tela inicial, barra de progresso, janelas, campos na tela de edição, botões. Adequações em textos de ajuda. Correção de erros do PHP exibidos quando não havia conexão ativa. --- FoursquareAPI.Class.php | 9 ++- ProgressBar.Class.php | 2 +- edit.php | 4 +- estilo.css | 130 +++++++++++++++++++++------------------- js/4sq.js | 3 +- js/main.js | 2 +- load.php | 4 +- main.php | 17 ++++-- 8 files changed, 96 insertions(+), 75 deletions(-) diff --git a/FoursquareAPI.Class.php b/FoursquareAPI.Class.php index 393fa5c..ccd61f2 100644 --- a/FoursquareAPI.Class.php +++ b/FoursquareAPI.Class.php @@ -223,8 +223,13 @@ public function GeoLocate($addr){ $geoapi = "https://maps.googleapis.com/maps/api/geocode/json"; $params = array("address"=>$addr,"key"=>"AIzaSyD9ZfpJz_ZlwOo7crLhiYhxcpJdBPpBVi8","sensor"=>"false"); $response = $this->GET($geoapi,$params); - $json = json_decode($response); - // If Status Code is ZERO_RESULTS, OVER_QUERY_LIMIT, REQUEST_DENIED or INVALID_REQUEST + if (empty($response)) { + $json = new stdClass(); + $json->status = ""; + } else { + $json = json_decode($response); + } + // If Status Code is ZERO_RESULTS, OVER_QUERY_LIMIT, REQUEST_DENIED or INVALID_REQUEST if ($json->status != "OK") { return NULL; } else { diff --git a/ProgressBar.Class.php b/ProgressBar.Class.php index 5b14e87..a52c895 100644 --- a/ProgressBar.Class.php +++ b/ProgressBar.Class.php @@ -38,7 +38,7 @@ function getContent() {
-
+

'; diff --git a/edit.php b/edit.php index 1e8555b..f4af360 100644 --- a/edit.php +++ b/edit.php @@ -31,12 +31,12 @@ Elio Tools - + - +

Editar venues

Antes de salvar suas alterações, não deixe de ler nosso guia de estilo e as regras da casa.

diff --git a/estilo.css b/estilo.css index 3fe1e75..ba317b9 100644 --- a/estilo.css +++ b/estilo.css @@ -1,7 +1,7 @@ body, html { font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 13px; - color: #5a5858; + color: #4E595D; } h1 { color: #444444; @@ -19,23 +19,13 @@ h3 { font-size: 14px; margin-top: 15px; } -a:link { - color: #2398c9; - text-decoration: none; - font-weight: bold; -} -a:visited { - color: #2398c9; - text-decoration: none; - font-weight: bold; -} -a:active { - color: #2398c9; +a, a:link, a:visited, a:active { + color: #2d5be3; text-decoration: none; font-weight: bold; } a:hover { - color: #2398c9; + color: #2d5be3; text-decoration: underline; font-weight: bold; } @@ -54,7 +44,7 @@ a:hover { min-width: 699px; background-color: #f9f9f9; border: 1px solid #cccccc; - margin-bottom: 15px; + margin-bottom: 8px; display: table; min-height: 0; padding: 5px 0px 0px 3px; @@ -77,7 +67,7 @@ a:hover { #toolContainer .row span.labelBlanck { float: left; width: 547px; - padding-top: 1px; + padding-top: 2px; } #toolContainer .row span.labelLl { float: left; @@ -109,18 +99,15 @@ a:hover { } #toolContainer .row span.button { float: left; - padding-bottom: 2px; - padding-top: 2px; } #toolContainer .row span.arquivo { float: left; - padding-top: 8px; + padding-top: 6px; padding-left: 12px; padding-bottom: 15px; } .dijitButton.continue .dijitButtonNode { margin-left: -3px; - line-height: 17px; } #toolContainer .row span.checkboxes { float: left; @@ -135,18 +122,50 @@ a:hover { width: 269px; overflow: hidden; } -#toolContainer .row span.combobox .dijitArrowButtonInner { - width: 19px; +.tundra .dijitSelect .dijitButtonContents, .tundra .dijitTextBox .dijitButtonNode { + height: 21px; overflow: hidden; + padding-left: 2px; +} +/*.tundra .dijitComboBox .dijitHasDropDownOpen .dijitArrowButtonInner {*/ +.tundra .dijitArrowButtonInner { + margin: 2px 4px; +} +.tundra .dijitInputContainer input { + margin: 0.2em 0.1em; } -.claro .dijitComboBox .dijitHasDropDownOpen .dijitArrowButtonInner { - width: 17px !important; +.dijitInputInner { + margin-left: 2px !important; + margin-right: 2px !important; } #toolContainer .row span.comboboxes .dijitSelectLabel { width: 72px; - height: 16px; overflow: hidden; } +.tundra .dijitValidationTextBoxError .dijitValidationIcon { + margin-right: 2px; + margin-top: 2px; +} +.dijitValidationTextBoxError input.dijitValidationInner, .dijitSelect input, .dijitTextBox input.dijitArrowButtonInner { + height: 17px !important; +} +.dijitPlaceHolder { + left: 2px; + top: 3px; +} +.tundra .dijitMenuItem td { + padding: 4px 4px 4px 2px !important; +} +.tundra .dijitDialogCloseIcon { + top: 4px; + background-position: center center; +} +.tundra .dijitDialogCloseIconHover { + background-position: center center; +} +.dijitDialogPaneActionBar { + margin-left: -3px; margin-top: 8px +} .checkbox { float: left; margin-top: 1px; @@ -156,7 +175,7 @@ a:hover { float: left; padding-left: 3px; padding-bottom: 8px; - padding-top: 5px; + padding-top: 4px; } .pb_container { position: relative; @@ -165,29 +184,26 @@ a:hover { .pb_bar { width: 100%; height: 1.3em; - border: 1px solid #769dc0; + border: 1px solid; + border-color: #a2a2a2 #b8b8b8 #b8b8b8 #a2a2a2; + background: #ffffff url("js/dijit/themes/tundra/images/progressBarEmpty.png") repeat-x center center; } .pb_before { float: left; height: 1.3em; - background: #abd6ff url("js/dijit/themes/claro/images/progressBarFull.png") repeat-x top; -} -.pb_after { - float: left; - border-right: 1px solid #769dc0; - /*background: #ffffff url("js/dijit/themes/claro/images/progressBarEmpty.png") repeat-none left;*/ - background: #ffffff url("js/dijit/themes/claro/images/progressBarFull.png") repeat-none left; + background: #abd6ff url("js/dijit/themes/tundra/images/progressBarFull.png") repeat-x center center; + border-right: 1px solid #b8b8b8; } .pb_indeterminate { float: left; height: 1.3em; - background: #efefef url("js/dijit/themes/claro/images/progressBarAnim.gif") repeat-x top; + background: #fff url("js/dijit/themes/tundra/images/progressBarAnim.gif") repeat-x center center; } .pb_text { padding-top: 0.1em; position: absolute; left: 48%; - color: #000000; + color: #293a4b; } #listContainer { width: 1px; @@ -196,7 +212,7 @@ a:hover { background-color: #F7F6F6; border: 1px solid #cccccc; font-size: 12px; - margin-bottom: 15px; + margin-bottom: 6px; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px; @@ -249,10 +265,11 @@ a:hover { } #treeContainer { width: 375px; - height: 224px; + height: 207px; font-size: 12px; - padding-top: 3px; + padding-top: 5px; margin-bottom: 6px; + margin-left: 1px; -moz-user-select: -moz-none; -khtml-user-select: none; -webkit-user-select: none; @@ -268,52 +285,45 @@ a:hover { } .flagIcon { background-image: url(img/flag.png); - width: 10px; - height: 10px; + width: 10px !important; + height: 10px !important; margin-left: 2px; - margin-right: 2px; } .doesnt_existIcon { background-image: url(img/doesnt_exist.png); - width: 10px; - height: 10px; + width: 10px !important; + height: 10px !important; margin-left: 2px; - margin-right: 2px; } .closedIcon { background-image: url(img/closed.png); - width: 10px; - height: 10px; + width: 10px !important; + height: 10px !important; margin-left: 2px; - margin-right: 2px; } .inappropriateIcon { background-image: url(img/inappropriate.png); - width: 10px; - height: 10px; + width: 10px !important; + height: 10px !important; margin-left: 2px; - margin-right: 2px; } .event_overIcon { background-image: url(img/event_over.png); - width: 10px; - height: 10px; + width: 10px !important; + height: 10px !important; margin-left: 2px; - margin-right: 2px; } .exportIcon { background-image: url(img/export.png); - width: 10px; - height: 10px; + width: 10px !important; + height: 10px !important; margin-left: 2px; - margin-right: 2px; } .privateIcon { background-image: url(img/private.png); - width: 10px; - height: 10px; + width: 10px !important; + height: 10px !important; margin-left: 2px; - margin-right: 2px; } #mapa { width: 533px; diff --git a/js/4sq.js b/js/4sq.js index 5b6e8e3..22e83f5 100644 --- a/js/4sq.js +++ b/js/4sq.js @@ -1419,8 +1419,9 @@ window.onbeforeunload = function() { function showDialogGuia() { // set the content of the dialog: - dlg_guia.attr("content", ""); + dlg_guia.attr("content", ""); dlg_guia.show(); + dlg_guia.attr("style", "width: 455px;"); } function showDialogComment(caller, comment) { diff --git a/js/main.js b/js/main.js index d641b59..7c6f26c 100644 --- a/js/main.js +++ b/js/main.js @@ -243,7 +243,7 @@ function showDialogTxt() { function showDialogLks() { // set the content of the dialog: - dlg_lks.attr("content", "Uma página web é qualquer documento ou recurso de informação que pode ser acessado através de um navegador na Internet. Ela deve ser pública e conter os identificadores de cada venue a ser editada.

Os principais endereços reconhecidos são os seguintes:

Exemplos de endereços:

https://foursquare.com/4sqcities/list/sampa-badge
https://pt.foursquare.com/search?tab=venueResults&q=via&near=Bras%C3%ADlia

"); + dlg_lks.attr("content", "Uma página web é qualquer documento ou recurso de informação que pode ser acessado através de um navegador na Internet. Ela deve ser pública e conter os identificadores de cada venue a ser editada.

Os principais endereços reconhecidos são os seguintes:

Exemplos de endereços:

https://foursquare.com/4sqcities/list/sampa-badge
https://pt.foursquare.com/search?tab=venueResults&q=via&near=Bras%C3%ADlia

"); dlg_lks.show(); } diff --git a/load.php b/load.php index ee245e0..1792cb1 100644 --- a/load.php +++ b/load.php @@ -31,11 +31,11 @@ - + '); define("HBODY", ' - + '); define("CARREGANDO", LINKS . HBODY . '
Carregando venues…
'); diff --git a/main.php b/main.php index 7be86c4..a5f3ee6 100644 --- a/main.php +++ b/main.php @@ -40,7 +40,12 @@ } else { // Our cache is out-of-date, so load the data from our remote server. $response = carregarListaCategorias(); - $categories = json_decode($response); + if (empty($response)) { + $categories = new stdClass(); + $categories->meta = ""; + } else { + $categories = json_decode($response); + } if (property_exists($categories->meta, "code") && ($categories->meta->code == "200")) { // JSON data is valid so save it over our cache for next time. $categories_loaded = true; @@ -81,12 +86,12 @@ function removeLocalCache($key) { } ?> - + - +

Edição de venues em massa via API

-
+
0)) echo "

Olá, " . $_COOKIE['name'] . "!

"; @@ -99,7 +104,7 @@ function removeLocalCache($key) {
- + Nenhum arquivo selecionado
@@ -120,7 +125,7 @@ function removeLocalCache($key) {
- + Nenhum arquivo selecionado