Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML & CSS clean up #82

Merged
merged 21 commits into from
Jul 5, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions core/View/OneClickDone.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ public function render()
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta charset="utf-8" />
<meta charset="utf-8">
<title></title>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion lang/fr.php
Original file line number Diff line number Diff line change
Expand Up @@ -2073,7 +2073,7 @@
'Transitions_NoDataForAction' => 'Il n\'y a aucune données pour %s',
'Transitions_NoDataForActionDetails' => 'L\'action n\'a eu aucune visite de page durant la période %s ou bien elle est invalide.',
'Transitions_ErrorBack' => 'Retour à l\'action précédente',
'Overlay_Overlay' => 'FOnd de page',
'Overlay_Overlay' => 'Fond de page',
'Overlay_PluginDescription' => 'Visualisez les données d\'analyse superposées sur votre site web.',
'Overlay_Location' => 'Localisation',
'Overlay_MainMetrics' => 'Métriques principales',
Expand Down
1 change: 0 additions & 1 deletion plugins/API/templates/listAllAPI.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% extends 'dashboard.twig' %}
{% set showSitesSelection=true %}
{% set showPeriodSelection=false %}
{% set showMenu=false %}

Expand Down
7 changes: 3 additions & 4 deletions plugins/CoreAdminHome/templates/optOut.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta charset="utf-8">
</head>
<body>
{% if not trackVisits %}
Expand Down
3 changes: 2 additions & 1 deletion plugins/CoreHome/CoreHome.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function getCssFiles($notification)
$cssFiles[] = "plugins/CoreHome/stylesheets/jquery.ui.autocomplete.css";
$cssFiles[] = "plugins/CoreHome/stylesheets/jqplot.css";
$cssFiles[] = "plugins/CoreHome/stylesheets/donate.css";
$cssFiles[] = "plugins/CoreHome/stylesheets/promo.css";
}

/**
Expand All @@ -85,14 +86,14 @@ function getJsFiles($notification)
$jsFiles[] = "plugins/CoreHome/javascripts/menu.js";
$jsFiles[] = "plugins/CoreHome/javascripts/menu_init.js";
$jsFiles[] = "plugins/CoreHome/javascripts/calendar.js";
$jsFiles[] = "plugins/CoreHome/javascripts/date.js";
$jsFiles[] = "plugins/CoreHome/javascripts/autocomplete.js";
$jsFiles[] = "plugins/CoreHome/javascripts/sparkline.js";
$jsFiles[] = "plugins/CoreHome/javascripts/corehome.js";
$jsFiles[] = "plugins/CoreHome/javascripts/datatable_manager.js";
$jsFiles[] = "plugins/CoreHome/javascripts/donate.js";
$jsFiles[] = "plugins/CoreHome/javascripts/jqplot.js";
$jsFiles[] = "libs/jqplot/jqplot-custom.min.js";
$jsFiles[] = "plugins/CoreHome/javascripts/promo.js";
}

}
15 changes: 9 additions & 6 deletions plugins/CoreHome/javascripts/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,14 +442,17 @@
});

// reset date/period when opening calendar
var firstClick = true;
$('#periodString').find('#date').click(function () {
if (!firstClick) {
datepickerElem.datepicker('setDate', currentDate);
$('#period_id_' + piwik.period).click();
$("#periodString").on('click', "#date,.calendar-icon", function () {
var periodMore = $("#periodMore").toggle();
if (periodMore.is(":visible")) {
periodMore.find(".ui-state-highlight").removeClass('ui-state-highlight');
}
});

firstClick = false;
$('body').on('click', function(e) {
if (!$(e.target).parents('#periodString').length && !$(e.target).is('#periodString') && !$(e.target).is('option') && $("#periodMore").is(":visible")) {
$("#periodMore").hide();
}
});

function onDateRangeSelect(dateText, inst) {
Expand Down
40 changes: 0 additions & 40 deletions plugins/CoreHome/javascripts/date.js

This file was deleted.

12 changes: 12 additions & 0 deletions plugins/CoreHome/javascripts/promo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
$(function () {
$('#piwik-promo-thumbnail').click(function () {
var promoEmbed = $('#piwik-promo-embed'),
widgetWidth = $(this).closest('.widgetContent').width(),
height = (266 * widgetWidth) / 421,
embedHtml = '<iframe width="100%" height="' + height + '" src="http://www.youtube.com/embed/OslfF_EH81g?autoplay=1&vq=hd720&wmode=transparent" frameborder="0" wmode="Opaque"></iframe>';

$(this).hide();
promoEmbed.height(height).html(embedHtml);
promoEmbed.show();
});
});
4 changes: 2 additions & 2 deletions plugins/CoreHome/javascripts/sparkline.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
function initializeSparklines() {
var sparklineUrlParamsToIgnore = ['module', 'action', 'idSite', 'period', 'date', 'viewDataTable'];

$("a[name='evolutionGraph']").each(function () {
$("[data-graph-id]").each(function () {
var graph = $(this);

// try to find sparklines and add them clickable behaviour
Expand All @@ -32,7 +32,7 @@ function initializeSparklines() {

// on click, reload the graph with the new url
$(this).click(function () {
var idDataTable = graph.attr('graphId'),
var idDataTable = graph.attr('data-graph-id'),
dataTable = $('#' + idDataTable);

// when the metrics picker is used, the id of the data table might be updated (which is correct behavior).
Expand Down
78 changes: 78 additions & 0 deletions plugins/CoreHome/stylesheets/promo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#piwik-promo-thumbnail {
background: #fff url(plugins/CoreHome/images/promo_splash.png) no-repeat 0 0;
background-position: center;
width: 321px;
margin: 0 auto 0 auto;
}

#piwik-promo-embed {
margin-left: 1px;
}

#piwik-promo-embed>iframe {
z-index: 0;
}

#piwik-promo-thumbnail {
height: 178px;
}

#piwik-promo-thumbnail:hover {
opacity: .75;
cursor: pointer;
}

#piwik-promo-thumbnail>img {
display: block;
position: relative;
top: 53px;
left: 125px;
}

#piwik-promo-video {
margin: 2em 0 2em 0;
}

#piwik-widget-footer {
margin: 0 1em 1em 1em;
}

#piwik-promo-share {
margin: 0 2em 1em 0;
background-color: #CCC;

border: 1px solid #CCC;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;

display: inline-block;

padding: 0 .5em 0 .5em;

float: right;
}

#piwik-promo-share > a {
margin-left: .5em;
margin-top: 4px;
display: inline-block;
}

#piwik-promo-share>span {
display: inline-block;
vertical-align: top;
margin-top: 4px;
}

#piwik-promo-videos-link {
font-size: .8em;
font-style: italic;
margin: 1em 0 0 1.25em;
color: #666;
display: inline-block;
}

#piwik-promo-videos-link:hover {
text-decoration: none;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<a name="{{ reportId }}"></a>
<h2 style="color: rgb({{ reportTitleTextColor }}); font-size: {{ reportTitleTextSize }}pt;">
<h2 id="{{ reportId }}" style="color: rgb({{ reportTitleTextColor }}); font-size: {{ reportTitleTextSize }}pt;">
{{ reportName }}
</h2>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta charset="utf-8">
</head>
<body style="color: rgb({{ reportTextColor }});">

<a name="reportTop"/>
<a target="_blank" href="{{ currentPath }}"><img title="{{ 'General_GoTo'|translate("Piwik") }}" border="0" alt="Piwik" src='{{ logoHeader }}'/></a>
<a id="reportTop" target="_blank" href="{{ currentPath }}"><img title="{{ 'General_GoTo'|translate("Piwik") }}" border="0" alt="Piwik" src='{{ logoHeader }}'/></a>

<h1 style="color: rgb({{ reportTitleTextColor }}); font-size: {{ reportTitleTextSize }}pt;">
{{ websiteName }}
Expand Down
3 changes: 1 addition & 2 deletions plugins/CoreHome/templates/_dataTable.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
<div class="pk-emptyDataTable">{{ 'CoreHome_ThereIsNoDataForThisReport'|translate }}</div>
{% endif %}
{% else %}
<a name="{{ properties.uniqueId }}"></a>
<table cellspacing="0" class="dataTable">
<table cellspacing="0" class="dataTable" id="{{ properties.uniqueId }}">
{% include "@CoreHome/_dataTableHead.twig" %}

<tbody>
Expand Down
10 changes: 6 additions & 4 deletions plugins/CoreHome/templates/_menu.twig
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<ul class="nav">
{% for level1,level2 in menu %}
<li>
<a name='{{ level2._url|urlRewriteWithParameters }}' href='#{{ level2._url|urlRewriteWithParameters|slice(1) }}'
onclick='return piwikMenu.onItemClick(this);'>{{ level1|translate }}</a>
<li id="{{ level2._url|urlRewriteWithParameters }}">
<a href="#{{ level2._url|urlRewriteWithParameters|slice(1) }}"
onclick="return piwikMenu.onItemClick(this);">{{ level1|translate }}</a>
<ul>
{% for name,urlParameters in level2 %}
{% if name|slice(0,1) != '_' %}
<li>
<a href='#{{ urlParameters._url|urlRewriteWithParameters|slice(1) }}'
onclick='return piwikMenu.onItemClick(this);'>{{ name|translate }}</a>
onclick='return piwikMenu.onItemClick(this);'>
{{ name|translate }}
</a>
</li>
{% endif %}
{% endfor %}
Expand Down
10 changes: 0 additions & 10 deletions plugins/CoreHome/templates/_topBar.twig
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@

{% if showTopMenu is not defined or showTopMenu %}
<div id="topBars">
{% include "@CoreHome/_topBarTopMenu.twig" %}
{% include "@CoreHome/_topBarHelloMenu.twig" %}
</div>
{% endif %}

{% if showSitesSelection is not defined or showSitesSelection %}
<div class="top_bar_sites_selector">
<label>{{ 'General_Website'|translate }}</label>
{% include "@CoreHome/_siteSelect.twig" %}
</div>
{% endif %}
1 change: 1 addition & 0 deletions plugins/CoreHome/templates/_topScreen.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<div id="header">
{% include "@CoreHome/_logo.twig" %}
{% include "@CoreHome/_topBar.twig" %}
</div>
7 changes: 5 additions & 2 deletions plugins/CoreHome/templates/getDefaultIndexView.twig
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{% extends "dashboard.twig" %}

{% set showSitesSelection=true %}

{% block content %}

<div class="top_bar_sites_selector">
<label>{{ 'General_Website'|translate }}</label>
{% include "@CoreHome/_siteSelect.twig" %}
</div>

{% if (menu is defined and menu) %}
{% include "@CoreHome/_menu.twig" %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion plugins/CoreHome/templates/getDonateForm.twig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{% include "@CoreHome/_donate.twig" %}
{% include "@CoreHome/_donate.twig" %}
Loading