Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeezyT <timo@ezdesign.de>2012-09-25 18:54:12 +0400
committerBeezyT <timo@ezdesign.de>2012-09-25 18:54:12 +0400
commitd34e1e895ad5d87d4337c475464374cf2e49cf4c (patch)
tree298fc0cc45bcec6b840b6112737c2edccab16267 /plugins
parent10f8c2085059d51422aaed83f9bf51574e5ef30e (diff)
refs #3332 Transitions:
* hover effect and tooltip for row action icons * more robust hash handling git-svn-id: http://dev.piwik.org/svn/trunk@7059 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CoreHome/templates/broadcast.js3
-rw-r--r--plugins/CoreHome/templates/datatable.css5
-rw-r--r--plugins/CoreHome/templates/datatable.js35
-rw-r--r--plugins/CoreHome/templates/datatable_rowactions.js6
-rw-r--r--plugins/Transitions/templates/transitions.js6
-rwxr-xr-xplugins/Transitions/templates/transitions_icon.pngbin643 -> 643 bytes
-rwxr-xr-xplugins/Transitions/templates/transitions_icon_hover.pngbin0 -> 647 bytes
7 files changed, 54 insertions, 1 deletions
diff --git a/plugins/CoreHome/templates/broadcast.js b/plugins/CoreHome/templates/broadcast.js
index 1593dd8dd4..3972f2007d 100644
--- a/plugins/CoreHome/templates/broadcast.js
+++ b/plugins/CoreHome/templates/broadcast.js
@@ -80,7 +80,8 @@ var broadcast = {
if( hash ) {
var hashParts = hash.split('#');
- var firstHashUpdated = (hashParts.length == 1); // i.e. no second hash yet
+ var firstHashUpdated = (hashParts.length == 1 ||
+ (broadcast.currentHashParts[0] !== null && broadcast.currentHashParts[0] != hashParts[0]));
var secondHashUpdated = (hashParts.length > 1 && hashParts[0] == broadcast.currentHashParts[0]);
if (broadcast.currentHashParts[0] === null) {
// new page load
diff --git a/plugins/CoreHome/templates/datatable.css b/plugins/CoreHome/templates/datatable.css
index 90cdc97800..a2ba59678c 100644
--- a/plugins/CoreHome/templates/datatable.css
+++ b/plugins/CoreHome/templates/datatable.css
@@ -612,6 +612,11 @@ table.dataTable .dataTableRowActions a img {
height: 17px;
}
+body .piwik-tooltip.rowActionTooltip {
+ font-size: 11px;
+ padding: 3px 5px 3px 6px;
+}
+
.limitSelection {
float: right;
diff --git a/plugins/CoreHome/templates/datatable.js b/plugins/CoreHome/templates/datatable.js
index d8ebcc7b14..6cf7a4ec17 100644
--- a/plugins/CoreHome/templates/datatable.js
+++ b/plugins/CoreHome/templates/datatable.js
@@ -1314,10 +1314,45 @@ dataTable.prototype =
{
$(this).blur();
container.hide();
+ Piwik_Tooltip.hide();
actionInstances[action.name].trigger(tr, e);
return false;
}
})(action));
+
+ if (typeof action.dataTableIconHover != 'undefined')
+ {
+ actionEl.append($(document.createElement('img')).attr({src: action.dataTableIconHover}).hide());
+
+ actionEl.hover(function()
+ {
+ var img = $(this).find('img');
+ img.eq(0).hide();
+ img.eq(1).show();
+ },
+ function()
+ {
+ var img = $(this).find('img');
+ img.eq(1).hide();
+ img.eq(0).show();
+ });
+ }
+
+ if (typeof action.dataTableIconTooltip != 'undefined')
+ {
+ actionEl.hover((function(action)
+ {
+ return function() {
+ Piwik_Tooltip.showWithTitle(
+ action.dataTableIconTooltip[0],
+ action.dataTableIconTooltip[1],
+ 'rowActionTooltip');
+ };
+ })(action), function()
+ {
+ Piwik_Tooltip.hide();
+ });
+ }
}
return container;
diff --git a/plugins/CoreHome/templates/datatable_rowactions.js b/plugins/CoreHome/templates/datatable_rowactions.js
index 2a604ea709..34a5b2dd49 100644
--- a/plugins/CoreHome/templates/datatable_rowactions.js
+++ b/plugins/CoreHome/templates/datatable_rowactions.js
@@ -58,6 +58,12 @@ DataTable_RowActions_Registry.register({
name: 'RowEvolution',
dataTableIcon: 'themes/default/images/row_evolution.png',
+ dataTableIconHover: 'themes/default/images/row_evolution_hover.png',
+
+ dataTableIconTooltip: [
+ _pk_translate('CoreHome_RowEvolutionRowActionTooltipTitle_js'),
+ _pk_translate('CoreHome_RowEvolutionRowActionTooltip_js')
+ ],
createInstance: function(dataTable) {
return new DataTable_RowActions_RowEvolution(dataTable);
diff --git a/plugins/Transitions/templates/transitions.js b/plugins/Transitions/templates/transitions.js
index facfae3e9e..7f181c197e 100644
--- a/plugins/Transitions/templates/transitions.js
+++ b/plugins/Transitions/templates/transitions.js
@@ -38,6 +38,12 @@ DataTable_RowActions_Registry.register({
name: 'Transitions',
dataTableIcon: 'plugins/Transitions/templates/transitions_icon.png',
+ dataTableIconHover: 'plugins/Transitions/templates/transitions_icon_hover.png',
+
+ dataTableIconTooltip: [
+ _pk_translate('CoreHome_TransitionsRowActionTooltipTitle_js'),
+ _pk_translate('CoreHome_TransitionsRowActionTooltip_js')
+ ],
createInstance: function(dataTable) {
return new DataTable_RowActions_Transitions(dataTable);
diff --git a/plugins/Transitions/templates/transitions_icon.png b/plugins/Transitions/templates/transitions_icon.png
index 08cc2f302e..b7f79961f0 100755
--- a/plugins/Transitions/templates/transitions_icon.png
+++ b/plugins/Transitions/templates/transitions_icon.png
Binary files differ
diff --git a/plugins/Transitions/templates/transitions_icon_hover.png b/plugins/Transitions/templates/transitions_icon_hover.png
new file mode 100755
index 0000000000..380915b9af
--- /dev/null
+++ b/plugins/Transitions/templates/transitions_icon_hover.png
Binary files differ