Skip to content

Commit

Permalink
Mudança do tema Claro para Tundra
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gavlinski committed Sep 5, 2014
1 parent 1c56de8 commit 1f91c13
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 75 deletions.
9 changes: 7 additions & 2 deletions FoursquareAPI.Class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion ProgressBar.Class.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function getContent() {
<div id="'.$this->textid.'" class="'.$this->textid.'" style="display: none"></div>
<div class="pb_bar">
<div id="'.$this->pbarid.'" class="pb_indeterminate" style="width: 100%;"></div>
<div id="'.$this->tbarid.'" class="pb_after"></div>
<div id="'.$this->tbarid.'"></div>
</div>
<br style="height: 1px; font-size: 1px;"/>
</div>';
Expand Down
4 changes: 2 additions & 2 deletions edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
<title>Elio Tools</title>
<meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1"/>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="js/dijit/themes/claro/claro.css"/>
<link rel="stylesheet" type="text/css" href="js/dijit/themes/tundra/tundra.css"/>
<link rel="stylesheet" type="text/css" href="estilo.css"/>
<script src="js/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
<script type="text/javascript" src="js/4sq.js"></script>
</head>
<body class="claro">
<body class="tundra">
<h2>Editar venues</h2>
<p>Antes de salvar suas altera&ccedil;&otilde;es, n&atilde;o deixe de ler nosso <a id="guia" href="javascript:showDialogGuia()">guia de estilo</a> e as <a id="regras" href="https://pt.foursquare.com/info/houserules" target="_blank">regras da casa</a>.</p>
<div id="mapa"></div>
Expand Down
130 changes: 70 additions & 60 deletions estilo.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
body, html {
font-family: Arial, Helvetica, Verdana, sans-serif;
font-size: 13px;
color: #5a5858;
color: #4E595D;
}
h1 {
color: #444444;
Expand All @@ -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;
}
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -156,7 +175,7 @@ a:hover {
float: left;
padding-left: 3px;
padding-bottom: 8px;
padding-top: 5px;
padding-top: 4px;
}
.pb_container {
position: relative;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion js/4sq.js
Original file line number Diff line number Diff line change
Expand Up @@ -1419,8 +1419,9 @@ window.onbeforeunload = function() {

function showDialogGuia() {
// set the content of the dialog:
dlg_guia.attr("content", "<ul><li><p>Use sempre a ortografia, acentua&ccedil;&atilde;o e as letras mai&uacute;sculas e min&uacute;sculas corretas.</p></li><li><p>Em redes ou venues com v&aacute;rios locais, n&atilde;o &eacute; preciso adicionar um sufixo de local. Portanto, pode deixar &quot;Subway&quot; ou &quot;Loja Americanas&quot; (em vez de &quot;Subway - Ponta Verde&quot; ou &quot;Lojas Americanas - Iguatemi&quot;).</p></li><li><p>Os nomes das venues devem respeitar o grafia original do lugar sem abrevia&ccedil;&otilde;es (principalmente nomes de empresas).</p></li><li><p>Sempre use abrevia&ccedil;&otilde;es nos endere&ccedil;os: &quot;Av.&quot; em vez de &quot;Avenida&quot;, &quot;R.&quot; em vez de &quot;Rua&quot;, etc., observando as <a href='http://www.buscacep.correios.com.br' target='_blank'>diretrizes postais locais</a>.</p></li><li>O preenchimento da Rua Cross &eacute; opcional e deve ser realizado da seguinte forma:<ul><li>R. Bela Cintra (para venues em uma esquina)</li><li>R. Bela Cintra x R. Haddock Lobo (para venues entre duas quadras)</li></ul><br></li><li>Na Rua Cross tamb&eacute;m podem ser inclu&iacute;dos:<ul><li>Bairro, complemento, ponto de refer&ecirc;ncia ou via de acesso (quando relevante)</li><li>Bloco, piso, loja ou setor (para subvenues)</li></ul></li><li><p>Os nomes de Estados devem ser abreviados: &quot;RJ&quot; em vez de &quot;Rio de Janeiro&quot;.</p></li><li><p>Em caso de d&uacute;vida sobre a cria&ccedil;&atilde;o e edi&ccedil;&atilde;o de venues no foursquare, consulte nossas <a href='https://pt.foursquare.com/info/houserules' target='_blank'>regras da casa</a> e as <a href='http://support.foursquare.com/forums/191151-venue-help' target='_blank'>perguntas frequentes sobre venues</a>.</p></li></ul>");
dlg_guia.attr("content", "<ul style='width: 415px; padding-left: 18px; margin-top: -10px'><li><p>Use sempre a ortografia, acentua&ccedil;&atilde;o e as letras mai&uacute;sculas e min&uacute;sculas corretas.</p></li><li><p>Em redes ou venues com v&aacute;rios locais, n&atilde;o &eacute; preciso adicionar um sufixo de local. Portanto, pode deixar &quot;Subway&quot; ou &quot;Loja Americanas&quot; (em vez de &quot;Subway - Ponta Verde&quot; ou &quot;Lojas Americanas - Iguatemi&quot;).</p></li><li><p>Os nomes das venues devem respeitar o grafia original do lugar sem abrevia&ccedil;&otilde;es (principalmente nomes de empresas).</p></li><li><p>Sempre use abrevia&ccedil;&otilde;es nos endere&ccedil;os: &quot;Av.&quot; em vez de &quot;Avenida&quot;, &quot;R.&quot; em vez de &quot;Rua&quot;, etc., observando as <a href='http://www.buscacep.correios.com.br' target='_blank'>diretrizes postais locais</a>.</p></li><li><p>O preenchimento da Rua transversal &eacute; opcional no Brasil.</p></li><li>Na Rua transversal tamb&eacute;m podem ser inclu&iacute;dos:<ul style='padding-left: 18px; margin-top: 4px'><li>Bairro, complemento, ponto de refer&ecirc;ncia ou via de acesso (quando relevante)</li><li>Bloco, piso, loja ou setor (para subvenues)</li></ul></li><li><p>Os nomes de Estados devem ser abreviados: &quot;RJ&quot; em vez de &quot;Rio de Janeiro&quot;.</p></li><li><p>Em caso de d&uacute;vida sobre a cria&ccedil;&atilde;o e edi&ccedil;&atilde;o de venues no foursquare, consulte nossas <a href='https://pt.foursquare.com/info/houserules' target='_blank'>regras da casa</a> e as <a href='http://support.foursquare.com/forums/191151-venue-help' target='_blank'>perguntas frequentes sobre venues</a>.</p></li></ul>");
dlg_guia.show();
dlg_guia.attr("style", "width: 455px;");
}

function showDialogComment(caller, comment) {
Expand Down
2 changes: 1 addition & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ function showDialogTxt() {

function showDialogLks() {
// set the content of the dialog:
dlg_lks.attr("content", "Uma p&aacute;gina web &eacute; qualquer documento ou recurso de informa&ccedil;&atilde;o que pode ser acessado atrav&eacute;s de um navegador na Internet. Ela deve ser p&uacute;blica e conter os identificadores de cada venue a ser editada.</p><p>Os principais endere&ccedil;os reconhecidos s&atilde;o os seguintes:<ul><li><b>P&aacute;ginas com links para as venues:</b> com a tag &lt;a href=&quot;/venue/...&quot;&gt; ou &lt;a href=&quot;/v/...&quot;&gt;</li><li><b>P&aacute;ginas de usu&aacute;rios com prefeituras:</b> do tipo <span style='color: #2398c9;'>https://foursquare.com/user</span></li><li><b>Listas p&uacute;blicas de usu&aacute;rios:</b> do tipo <span style='color: #2398c9;'>https://foursquare.com/user/list/list-name</span></li><li><b>Resultados da pesquisa:</b> do tipo <span style='color: #2398c9;'>https://foursquare.com/search?tab=venueResults&q=query&near=ll</span></li></ul><p><b>Exemplos de endere&ccedil;os:</b></p><p style='font-family: courier, monospace;'>https://foursquare.com/4sqcities/list/sampa-badge<br>https://pt.foursquare.com/search?tab=venueResults&q=via&near=Bras%C3%ADlia</p>");
dlg_lks.attr("content", "Uma p&aacute;gina web &eacute; qualquer documento ou recurso de informa&ccedil;&atilde;o que pode ser acessado atrav&eacute;s de um navegador na Internet. Ela deve ser p&uacute;blica e conter os identificadores de cada venue a ser editada.</p><p>Os principais endere&ccedil;os reconhecidos s&atilde;o os seguintes:<ul><li><b>P&aacute;ginas com links para as venues:</b> com a tag &lt;a href=&quot;/venue/...&quot;&gt; ou &lt;a href=&quot;/v/...&quot;&gt;</li><li><b>P&aacute;ginas de usu&aacute;rios com dicas:</b> do tipo <span style='color: #2d5be3;'>https://foursquare.com/user</span></li><li><b>Listas p&uacute;blicas de usu&aacute;rios:</b> do tipo <span style='color: #2d5be3;'>https://foursquare.com/user/list/list-name</span></li><li><b>Resultados da pesquisa:</b> do tipo <span style='color: #2d5be3;'>https://foursquare.com/search?tab=venueResults&q=query&near=ll</span></li></ul><p><b>Exemplos de endere&ccedil;os:</b></p><p style='font-family: courier, monospace;'>https://foursquare.com/4sqcities/list/sampa-badge<br>https://pt.foursquare.com/search?tab=venueResults&q=via&near=Bras%C3%ADlia</p>");
dlg_lks.show();
}

Expand Down
4 changes: 2 additions & 2 deletions load.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
<?php
define("VERSION", "Venues Loader 1.4");
define("LINKS", '<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="js/dijit/themes/claro/claro.css"/>
<link rel="stylesheet" type="text/css" href="js/dijit/themes/tundra/tundra.css"/>
<link rel="stylesheet" type="text/css" href="estilo.css"/>
');
define("HBODY", '</head>
<body class="claro">
<body class="tundra">
');
define("CARREGANDO", LINKS . HBODY . '<div id="carregando">Carregando venues&hellip;</div>
');
Expand Down
17 changes: 11 additions & 6 deletions main.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -81,12 +86,12 @@ function removeLocalCache($key) {
}
?>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="js/dijit/themes/claro/claro.css"/>
<link rel="stylesheet" type="text/css" href="js/dijit/themes/tundra/tundra.css"/>
<link rel="stylesheet" type="text/css" href="estilo.css"/>
</head>
<body class="claro">
<body class="tundra">
<h2>Edi&ccedil;&atilde;o de venues em massa via API</h2>
<div style="width: 730px;">
<div style="width: 716px;">
<?php
if ((isset($_COOKIE['name'])) && (strlen($_COOKIE['name']) > 0))
echo "<p>Ol&aacute;, <span id=\"name\">" . $_COOKIE['name'] . "</span>!</p>";
Expand All @@ -99,7 +104,7 @@ function removeLocalCache($key) {
<div class="row"><span class="labelBlanck"></span></div>
<div class="row">
<span class="label"><label for="uploader_csv"><a id="dlg_csv" href="javascript:showDialogCsv();">Arquivo</a>:</label></span>
<span class="button"><input type="hidden" name="MAX_FILE_SIZE" value="500000" dojoType="dijit.form.TextBox"/><input name="csv" multiple="false" type="file" data-dojo-type="dojox.form.Uploader" label="Escolher arquivo" id="uploader_csv" style="margin-top: 1px;"/></span>
<span class="button"><input type="hidden" name="MAX_FILE_SIZE" value="500000" dojoType="dijit.form.TextBox"/><input name="csv" multiple="false" type="file" data-dojo-type="dojox.form.Uploader" label="Escolher arquivo" id="uploader_csv"/></span>
<span class="arquivo" id="arquivo_csv">Nenhum arquivo selecionado</span>
</div>
</div>
Expand All @@ -120,7 +125,7 @@ function removeLocalCache($key) {
<div id="toolcontainer">
<div class="row">
<span class="label"><label for="txt"><a id="dlg_txt" href="javascript:showDialogTxt();">Arquivo</a>:</label></span>
<span class="button"><input type="hidden" name="MAX_FILE_SIZE" value="5000000" dojoType="dijit.form.TextBox"/><input name="txt" multiple="false" type="file" data-dojo-type="dojox.form.Uploader" label="Escolher arquivo" id="uploader_txt" style=""/></span>
<span class="button"><input type="hidden" name="MAX_FILE_SIZE" value="5000000" dojoType="dijit.form.TextBox"/><input name="txt" multiple="false" type="file" data-dojo-type="dojox.form.Uploader" label="Escolher arquivo" id="uploader_txt"/></span>
<span class="arquivo" id="arquivo_txt">Nenhum arquivo selecionado</span>
</div>
<div class="row">
Expand Down

0 comments on commit 1f91c13

Please sign in to comment.