diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2011-01-07 14:28:33 +0300 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2011-01-07 14:28:33 +0300 |
commit | 5d4a89d53a6321e1a172dc05430c14dba1e8561e (patch) | |
tree | 0ae77f17fe41090c5bf71cbebb321c6036cc0904 | |
parent | 62dd9f0fbe77f3824bd036e32f99e703ddc2711a (diff) |
Fixes #1382
* now preventing editing 2 rows at once
* adding large SAVE button below the name on the left of the table (+ Cancel link which refreshes pages)
Fixes #1980
* simplifying admin CSS, reusing same styles as PDF, Goals and datatables
* deleting now unused icons & styles
git-svn-id: http://dev.piwik.org/svn/trunk@3663 59fd770c-687e-43c8-a1e3-f5a4ff64c105
26 files changed, 132 insertions, 141 deletions
diff --git a/core/Translate.php b/core/Translate.php index 16115d4ada..25c326860e 100644 --- a/core/Translate.php +++ b/core/Translate.php @@ -148,8 +148,15 @@ class Piwik_Translate } $moduleRegex = substr($moduleRegex, 0, -1); $moduleRegex .= ')_.*_js$#i'; - - foreach($GLOBALS['Piwik_translations'] as $key => $value) + + // Hack: common translations used in JS but not only, force as them to be defined in JS + $translations = $GLOBALS['Piwik_translations']; + $toSetInJs = array('General_Save', 'General_OrCancel'); + foreach($toSetInJs as $toSetId) + { + $translations[$toSetId.'_js'] = $translations[$toSetId]; + } + foreach($translations as $key => $value) { if( preg_match($moduleRegex,$key) ) { $js .= '"'.$key.'": "'.str_replace('"','\"',$value).'",'; diff --git a/lang/en.php b/lang/en.php index 539297e23d..c12f4b3463 100644 --- a/lang/en.php +++ b/lang/en.php @@ -336,7 +336,6 @@ $translations = array( 'CorePluginsAdmin_Activated' => 'Activated', 'CorePluginsAdmin_Active' => 'Active', 'CorePluginsAdmin_Inactive' => 'Inactive', - 'CorePluginsAdmin_ActivatedHelp' => 'This plugin cannot be deactivated', 'CorePluginsAdmin_Deactivate' => 'Deactivate', 'CorePluginsAdmin_Activate' => 'Activate', 'CorePluginsAdmin_MenuPlugins' => 'Plugins', @@ -710,6 +709,7 @@ $translations = array( 'SitesManager_WebsitesManagement' => 'Websites Management', 'SitesManager_MainDescription' => 'Your Web Analytics reports need Websites! Add, update, delete Websites, and show the JavaScript to insert in your pages.', 'SitesManager_YouCurrentlyHaveAccessToNWebsites' => 'You currently have access to %s websites.', + 'SitesManager_OnlyOneSiteAtTime_js' => 'You can only edit one website at a time. Please Save or Cancel your current modifications to the website %s.', 'SitesManager_JsTrackingTag' => 'JavaScript Tracking Tag', 'SitesManager_JsTrackingTagHelp' => 'Here is the JavaScript Tracking tag to include on all your pages', 'SitesManager_ShowTrackingTag' => 'show tracking tags', @@ -751,8 +751,6 @@ $translations = array( 'SitesManager_CurrencySymbolWillBeUsedForGoals' => 'The Currency symbol will be displayed next to Goals revenues.', 'SitesManager_DefaultCurrencyForNewWebsites' => 'Default Currency for new websites', 'SitesManager_SelectDefaultCurrency' => 'You can select the currency to set by default for new websites.', - 'SitesManager_Save_js' => 'Save', - 'SitesManager_Cancel_js' => 'Cancel', 'TranslationsAdmin_PluginDescription' => 'Help translate Piwik into your language.', 'TranslationsAdmin_MenuTranslations' => 'Translations', 'TranslationsAdmin_MenuLanguages' => 'Languages', diff --git a/plugins/CoreAdminHome/CoreAdminHome.php b/plugins/CoreAdminHome/CoreAdminHome.php index f9c9b71075..54971b5fc2 100644 --- a/plugins/CoreAdminHome/CoreAdminHome.php +++ b/plugins/CoreAdminHome/CoreAdminHome.php @@ -49,9 +49,9 @@ class Piwik_CoreAdminHome extends Piwik_Plugin { $cssFiles = &$notification->getNotificationObject(); + $cssFiles[] = "libs/jquery/themes/base/jquery-ui.css"; $cssFiles[] = "plugins/CoreAdminHome/templates/menu.css"; $cssFiles[] = "themes/default/common.css"; - $cssFiles[] = "libs/jquery/themes/base/jquery-ui.css"; $cssFiles[] = "plugins/CoreAdminHome/templates/styles.css"; } diff --git a/plugins/CoreAdminHome/templates/generalSettings.tpl b/plugins/CoreAdminHome/templates/generalSettings.tpl index 3681695e35..29e9edefe3 100644 --- a/plugins/CoreAdminHome/templates/generalSettings.tpl +++ b/plugins/CoreAdminHome/templates/generalSettings.tpl @@ -9,7 +9,7 @@ {ajaxErrorDiv id=ajaxError} {ajaxLoadingDiv id=ajaxLoading} -<table class="adminTable adminTableNoBorder" style='width:900px;'> +<table class="adminTable" style='width:900px;'> <tr> <td style='width:400px'>{'General_AllowPiwikArchivingToTriggerBrowser'|translate}</td> <td style='width:220px'> @@ -56,7 +56,7 @@ <h2>{'CoreAdminHome_EmailServerSettings'|translate}</h2> <div id='emailSettings'> -<table class="adminTable adminTableNoBorder" style='width:600px;'> +<table class="adminTable" style='width:600px;'> <tr> <td>{'General_UseSMTPServerForEmail'|translate}</label><br> <span class="form-description">{'General_SelectYesIfYouWantToSendEmailsViaServer'|translate}</span> @@ -70,7 +70,7 @@ </div> <div id='smtpSettings'> - <table class="adminTable adminTableNoBorder" style='width:550px;'> + <table class="adminTable" style='width:550px;'> <tr> <td><label for="mailHost">{'General_SmtpServerAddress'|translate}</label></td> <td style='width:200px'><input type="text" id="mailHost" value="{$mail.host}"></td> diff --git a/plugins/CoreAdminHome/templates/styles.css b/plugins/CoreAdminHome/templates/styles.css index d5f58438e4..03d645b725 100644 --- a/plugins/CoreAdminHome/templates/styles.css +++ b/plugins/CoreAdminHome/templates/styles.css @@ -1,5 +1,5 @@ .admin img { - vertical-align: baseline; + vertical-align: middle;; } .admin a { color: black; @@ -89,89 +89,44 @@ table.admin tbody td:hover, table.admin tbody th:hover { padding-bottom:20px; } .adminTable { - border-width: 1px; - border-style: solid; - border-collapse: collapse; width: 100%; clear: both; margin: 0; } .adminTable a { text-decoration: none; + color:#2B5C97; } .adminTable abbr { white-space: nowrap; } -.adminTable td, .adminTable th { - border-bottom-width: 1px; - border-bottom-style: solid; - border-bottom-color: #ccc; +.adminTable td { font-size: 13px; vertical-align: text-top; vertical-align:top; -} -.adminTable td { padding: 7px 15px 9px 10px; vertical-align: top; } -.adminTable th { - padding: 9px 15px 6px 10px; - text-align: left; - line-height: 1.3em; -} -.adminTable th input { - margin: 0 0 0 8px; - padding: 0; +.adminTable td.action-links { + text-align: right; } .adminTable .check-column { text-align: right; width: 1.5em; padding: 0; } -.adminTable { - border-color: #ccc; -} -.adminTable tbody th.check-column { - padding: 8px 0 22px; -} .adminTable .num { text-align: center; } -.adminTable td, .adminTable th { - border-bottom-color: #ccc; -} -.adminTable thead { - background-color: #464646; - color: #d7d7d7; -} -.adminTable td.action-links, .adminTable th.action-links { - text-align: right; -} .adminTable .name { font-weight: bold; } -.adminTable a { - border-bottom:1px dotted; - color:#2B5C97; -} -.adminTable .active { - background-color: #ECF9DD; -} - .adminTable .ui-inline-help { margin-top:0; width:100%; } -/* admin table, without borders */ -.adminTableNoBorder { - border:0; -} -.adminTableNoBorder td, .adminTableNoBorder th { - border:0; -} /* other styles */ - .form-description { color:#666666; font-style:italic; diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php index 5e3bd9c142..953762a842 100644 --- a/plugins/CoreHome/CoreHome.php +++ b/plugins/CoreHome/CoreHome.php @@ -38,8 +38,8 @@ class Piwik_CoreHome extends Piwik_Plugin { $cssFiles = &$notification->getNotificationObject(); - $cssFiles[] = "themes/default/common.css"; $cssFiles[] = "libs/jquery/themes/base/jquery-ui.css"; + $cssFiles[] = "themes/default/common.css"; $cssFiles[] = "plugins/CoreHome/templates/styles.css"; $cssFiles[] = "plugins/CoreHome/templates/menu.css"; $cssFiles[] = "plugins/CoreHome/templates/datatable.css"; diff --git a/plugins/CorePluginsAdmin/templates/manage.tpl b/plugins/CorePluginsAdmin/templates/manage.tpl index 6df8dd32f9..51ab152c8b 100644 --- a/plugins/CorePluginsAdmin/templates/manage.tpl +++ b/plugins/CorePluginsAdmin/templates/manage.tpl @@ -6,7 +6,8 @@ <h2>{'CorePluginsAdmin_PluginsManagement'|translate}</h2> <p>{'CorePluginsAdmin_MainDescription'|translate}</p> -<table class="adminTable"> +<div class='entityContainer'> +<table class="dataTable entityTable"> <thead> <tr> <th>{'CorePluginsAdmin_Plugin'|translate}</th> @@ -19,7 +20,7 @@ <tbody id="plugins"> {foreach from=$pluginsName key=name item=plugin} {if isset($plugin.alwaysActivated) && !$plugin.alwaysActivated} - <tr class={if $plugin.activated}"active"{else}"deactivate"{/if}> + <tr {if $plugin.activated}class="highlight"{/if}> <td class="name"> {if isset($plugin.info.homepage)}<a title="{'CorePluginsAdmin_PluginHomepage'|translate}" href="{$plugin.info.homepage}" target="_blank">{/if} {$name} @@ -37,14 +38,12 @@ {/if} </td> <td class="status"> - {if $plugin.alwaysActivated}<span title="{'CorePluginsAdmin_ActivatedHelp'|translate}" class="active">{'CorePluginsAdmin_Active'|translate}</span> - {elseif $plugin.activated}{'CorePluginsAdmin_Active'|translate} + {if $plugin.activated}{'CorePluginsAdmin_Active'|translate} {else}{'CorePluginsAdmin_Inactive'|translate}{/if} </td> - <td class="togl action-links" {if $plugin.alwaysActivated}title="{'CorePluginsAdmin_ActivatedHelp'|translate}"{/if}> - {if $plugin.alwaysActivated} <center>-</center> - {elseif $plugin.activated}<a href='index.php?module=CorePluginsAdmin&action=deactivate&pluginName={$name}&token_auth={$token_auth}'>{'CorePluginsAdmin_Deactivate'|translate}</a> + <td class="togl action-links"> + {if $plugin.activated}<a href='index.php?module=CorePluginsAdmin&action=deactivate&pluginName={$name}&token_auth={$token_auth}'>{'CorePluginsAdmin_Deactivate'|translate}</a> {else}<a href='index.php?module=CorePluginsAdmin&action=activate&pluginName={$name}&token_auth={$token_auth}'>{'CorePluginsAdmin_Activate'|translate}</a>{/if} </td> </tr> @@ -52,6 +51,7 @@ {/foreach} </tbody> </table> +</div> </div> {include file="CoreAdminHome/templates/footer.tpl"} diff --git a/plugins/DBStats/templates/DBStats.tpl b/plugins/DBStats/templates/DBStats.tpl index 4cadd48776..031210f7e5 100644 --- a/plugins/DBStats/templates/DBStats.tpl +++ b/plugins/DBStats/templates/DBStats.tpl @@ -8,7 +8,7 @@ <p>{'DBStats_MainDescription'|translate:$totalSize} <br /> {'DBStats_LearnMore'|translate:"<a href='?module=Proxy&action=redirect&url=http://piwik.org/docs/setup-auto-archiving/' target='_blank'>Piwik Auto Archiving</a>"}</p> -<table class="adminTable"> +<table class="dataTable entityTable"> <thead> <th>{'DBStats_Table'|translate}</th> <th>{'DBStats_RowCount'|translate}</th> @@ -18,7 +18,7 @@ </thead> <tbody id="tables"> {foreach from=$tablesStatus key=index item=table} - <tr {if $table.Name == 'Total'}class="active" style="font-weight:bold;"{/if}> + <tr {if $table.Name == 'Total'}class="highlight" style="font-weight:bold;"{/if}> <td> {$table.Name} </td> diff --git a/plugins/MultiSites/templates/index.tpl b/plugins/MultiSites/templates/index.tpl index f729f1ca78..ee07c38b7f 100644 --- a/plugins/MultiSites/templates/index.tpl +++ b/plugins/MultiSites/templates/index.tpl @@ -85,12 +85,7 @@ prepareRows(allSites, params, '{$orderBy}'); {if $autoRefreshTodayReport} -{literal} -function refreshAfter(timeoutPeriod) { - setTimeout("location.reload(true);",timeoutPeriod); -} -refreshAfter(5*60*1000); -{/literal} +piwikHelper.refreshAfter(5*60*1000); {/if} </script> </div> diff --git a/plugins/PDFReports/templates/add.tpl b/plugins/PDFReports/templates/add.tpl index 3f9daa0f45..1f2cbdc839 100644 --- a/plugins/PDFReports/templates/add.tpl +++ b/plugins/PDFReports/templates/add.tpl @@ -84,6 +84,6 @@ </form> <div class='entityCancel'> {'General_OrCancel'|translate:"<a class='entityCancelLink'>":"</a>"} -</span> +</div> </div> diff --git a/plugins/SecurityInfo/templates/index.tpl b/plugins/SecurityInfo/templates/index.tpl index 38207d11d3..b163bdf25c 100644 --- a/plugins/SecurityInfo/templates/index.tpl +++ b/plugins/SecurityInfo/templates/index.tpl @@ -9,7 +9,7 @@ <div style="max-width:980px;"> {foreach from=$results.test_results key=i item=section} <h2>{$i}</h2> -<table class="adminTable"> +<table class="dataTable entityTable"> <thead> <tr> <th>{'SecurityInfo_Test'|translate}</th> diff --git a/plugins/SitesManager/templates/SitesManager.js b/plugins/SitesManager/templates/SitesManager.js index dcd91f1349..7dcf84d252 100644 --- a/plugins/SitesManager/templates/SitesManager.js +++ b/plugins/SitesManager/templates/SitesManager.js @@ -11,6 +11,8 @@ function SitesManager ( _timezones, _currencies, _defaultTimezone, _defaultCurre var currencies = _currencies; var defaultTimezone = _defaultTimezone; var defaultCurrency = _defaultCurrency; + var siteBeingEdited = false; + var siteBeingEditedName = ''; function getDeleteSiteAJAX( idSite ) { @@ -143,8 +145,8 @@ function SitesManager ( _timezones, _currencies, _defaultTimezone, _defaultCurre <td><textarea cols="20" rows="4" id="excludedQueryParameters"></textarea><br />'+excludedQueryParametersHelp+'</td>\ <td>'+getTimezoneSelector(defaultTimezone)+'<br />' + timezoneHelp + '</td>\ <td>'+getCurrencySelector(defaultCurrency)+'<br />' + currencyHelp + '</td>\ - <td><img src="plugins/UsersManager/images/ok.png" class="addsite" href="#" title="' + _pk_translate('SitesManager_Save_js') + '" /></td>\ - <td><img src="plugins/UsersManager/images/remove.png" class="cancel" title="' + _pk_translate('SitesManager_Cancel_js') +'" /></td>\ + <td><input type="submit" class="addsite submit" value="' + _pk_translate('General_Save_js') +'" /></td>\ + <td><span class="cancel link_but">'+sprintf(_pk_translate('General_OrCancel_js'),"","")+'</span></td>\ </tr>') .appendTo('#editSites') ; @@ -179,19 +181,35 @@ function SitesManager ( _timezones, _currencies, _defaultTimezone, _defaultCurre piwikHelper.hideAjaxError(); var idRow = $(this).attr('id'); if(alreadyEdited[idRow]==1) return; + if(siteBeingEdited) + { + alert(sprintf(_pk_translate('SitesManager_OnlyOneSiteAtTime_js'), '"'+$("<div/>").html(siteBeingEditedName).text()+'"')); + return; + } + siteBeingEdited = true; + alreadyEdited[idRow] = 1; $('tr#'+idRow+' .editableSite').each( // make the fields editable // change the EDIT button to VALID button function (i,n) { var contentBefore = $(n).html(); + var idName = $(n).attr('id'); if(idName == 'siteName') { + siteBeingEditedName = contentBefore; var contentAfter = '<input id="'+idName+'" value="'+contentBefore+'" size="15" />'; + + var inputSave = $('<br/><input style="margin-top:50px" type="submit" class="submit" value="'+_pk_translate('General_Save_js')+'" />') + .click( function(){ submitUpdateSite($(this).parent()); }); + var spanCancel = $('<div><br/>'+sprintf(_pk_translate('General_OrCancel_js'),"","")+'</div>') + .click( function(){ piwikHelper.refreshAfter(0); } ); $(n) .html(contentAfter) - .keypress( submitSiteOnEnter ); + .keypress( submitSiteOnEnter ) + .append(inputSave) + .append(spanCancel); } if(idName == 'urls') { @@ -228,7 +246,7 @@ function SitesManager ( _timezones, _currencies, _defaultTimezone, _defaultCurre $(this) .toggle() .parent() - .prepend( $('<img src="plugins/UsersManager/images/ok.png" class="updateSite" title="' + _pk_translate('SitesManager_Save_js') + '" />') + .prepend( $('<input type="submit" class="updateSite submit" value="' + _pk_translate('General_Save_js') + '" />') .click( function(){ $.ajax( getUpdateSiteAJAX( $('tr#'+idRow) ) ); } ) ); }); @@ -281,8 +299,12 @@ function SitesManager ( _timezones, _currencies, _defaultTimezone, _defaultCurre var key=e.keyCode || e.which; if (key==13) { - $(this).parent().find('.updateSite').click(); + submitUpdateSite(this); $(this).find('.addsite').click(); } } + function submitUpdateSite(self) + { + $(self).parent().find('.updateSite').click(); + } } diff --git a/plugins/SitesManager/templates/SitesManager.tpl b/plugins/SitesManager/templates/SitesManager.tpl index 5ede6f54a6..c9fdf86b62 100644 --- a/plugins/SitesManager/templates/SitesManager.tpl +++ b/plugins/SitesManager/templates/SitesManager.tpl @@ -45,6 +45,11 @@ $(document).ready( function() { </script> <style> +.entityTable tr td { + vertical-align: top; + padding-top:15px; +} + .addRowSite:hover, .editableSite:hover, .addsite:hover, .cancel:hover, .deleteSite:hover, .editSite:hover, .updateSite:hover{ cursor: pointer; } @@ -86,7 +91,8 @@ vertical-align:middle; {if $adminSites|@count == 0} {'SitesManager_NoWebsites'|translate} {else} - <table class="admin" id="editSites" border=1 cellpadding="10"> + <div class="entityContainer"> + <table class="entityTable dataTable" id="editSites"> <thead> <tr> <th>{'General_Id'|translate}</th> @@ -111,16 +117,17 @@ vertical-align:middle; <td id="excludedQueryParameters" class="editableSite">{foreach from=$site.excluded_parameters item=parameter}{$parameter}<br />{/foreach}</td> <td id="timezone" class="editableSite">{$site.timezone}</td> <td id="currency" class="editableSite">{$site.currency}</td> - <td><img src='plugins/UsersManager/images/edit.png' class="editSite" id="row{$i}" href='#' title="{'General_Edit'|translate}" /></td> - <td><img src='plugins/UsersManager/images/remove.png' class="deleteSite" id="row{$i}" title="{'General_Delete'|translate}" value="{'General_Delete'|translate}" /></td> + <td><span id="row{$i}" class='editSite link_but'><img src='themes/default/images/ico_edit.png' title="{'General_Edit'|translate}" border="0"/> {'General_Edit'|translate}</span></td> + <td><span id="row{$i}" class="deleteSite link_but"><img src='themes/default/images/ico_delete.png' title="{'General_Delete'|translate}" border="0" /> {'General_Delete'|translate}</span></td> <td><a href='{url action=displayJavascriptCode idSite=$site.idsite updated=false}'>{'SitesManager_ShowTrackingTag'|translate}</a></td> </tr> {/foreach} </tbody> </table> {if $isSuperUser} - <div class="addRowSite"><a href=""><img src='plugins/UsersManager/images/add.png' alt="" /> {'SitesManager_AddSite'|translate}</a></div> + <div class="addRowSite"><img src='plugins/UsersManager/images/add.png' alt="" /> {'SitesManager_AddSite'|translate}</div> {/if} + </div> {/if} {if $isSuperUser} @@ -128,7 +135,7 @@ vertical-align:middle; <a name='globalSettings'></a> <h2>{'SitesManager_GlobalWebsitesSettings'|translate}</h2> <br /> - <table style='width:600px' class="adminTable adminTableNoBorder" > + <table style='width:600px' class="adminTable" > <tr><td colspan="2"> <b>{'SitesManager_GlobalListExcludedIps'|translate}</b> diff --git a/plugins/UsersManager/images/add.png b/plugins/UsersManager/images/add.png Binary files differindex 1aa7f095c6..81de644a6f 100644 --- a/plugins/UsersManager/images/add.png +++ b/plugins/UsersManager/images/add.png diff --git a/plugins/UsersManager/images/edit.png b/plugins/UsersManager/images/edit.png Binary files differdeleted file mode 100644 index 188e1c12bd..0000000000 --- a/plugins/UsersManager/images/edit.png +++ /dev/null diff --git a/plugins/UsersManager/images/no.png b/plugins/UsersManager/images/no.png Binary files differdeleted file mode 100644 index ab6808fba5..0000000000 --- a/plugins/UsersManager/images/no.png +++ /dev/null diff --git a/plugins/UsersManager/images/remove.png b/plugins/UsersManager/images/remove.png Binary files differdeleted file mode 100644 index ab6808fba5..0000000000 --- a/plugins/UsersManager/images/remove.png +++ /dev/null diff --git a/plugins/UsersManager/images/valid.png b/plugins/UsersManager/images/valid.png Binary files differdeleted file mode 100644 index 6ef8de76e0..0000000000 --- a/plugins/UsersManager/images/valid.png +++ /dev/null diff --git a/plugins/UsersManager/templates/UsersManager.js b/plugins/UsersManager/templates/UsersManager.js index 0e108a1f87..e2523de88b 100644 --- a/plugins/UsersManager/templates/UsersManager.js +++ b/plugins/UsersManager/templates/UsersManager.js @@ -202,7 +202,7 @@ $(document).ready( function() { $(this) .toggle() .parent() - .prepend( $('<img src="plugins/UsersManager/images/ok.png" class="updateuser" />') + .prepend( $('<input type="submit" class="submit updateuser" value="'+_pk_translate('General_Save_js')+'" />') .click( function(){ $.ajax( getUpdateUserAJAX( $('tr#'+idRow) ) ); } ) ); }); @@ -239,8 +239,8 @@ $(document).ready( function() { <td><input id="useradd_email" value="email@domain.com" size="15" /></td>\ <td><input id="useradd_alias" value="alias" size="15" /></td>\ <td>-</td>\ - <td><img src="plugins/UsersManager/images/ok.png" class="adduser" /></td>\ - <td><img src="plugins/UsersManager/images/remove.png" class="cancel" /></td>\ + <td><input type="submit" class="submit adduser" value="'+_pk_translate('General_Save_js')+'" /></td>\ + <td><span class="cancel">'+sprintf(_pk_translate('General_OrCancel_js'),"","")+'</span></td>\ </tr>') .appendTo('#users') ; diff --git a/plugins/UsersManager/templates/UsersManager.tpl b/plugins/UsersManager/templates/UsersManager.tpl index dc322349b2..9b0e44c73d 100644 --- a/plugins/UsersManager/templates/UsersManager.tpl +++ b/plugins/UsersManager/templates/UsersManager.tpl @@ -14,17 +14,9 @@ font-weight:bold; text-align:center; } - -#access td, #users td { - spacing: 0px; - padding: 2px 5px 5px 4px; - border: 1px solid #660000; - width: 100px; -} .editable:hover, .addrow:hover, .updateAccess:hover, .accessGranted:hover, .adduser:hover, .edituser:hover, .deleteuser:hover, .updateuser:hover, .cancel:hover{ cursor: pointer; } - .addrow { font-color:#3A477B; padding:1em; @@ -63,29 +55,31 @@ {ajaxLoadingDiv} <div id="accessUpdated" class="ajaxSuccess">{'General_Done'|translate}!</div> -<table class="admin" id="access"> -<thead> -<tr> - <th>{'UsersManager_User'|translate}</th> - <th>{'UsersManager_PrivNone'|translate}</th> - <th>{'UsersManager_PrivView'|translate}</th> - <th>{'UsersManager_PrivAdmin'|translate}</th> -</tr> -</thead> - -<tbody> -{assign var=accesValid value="<img src='plugins/UsersManager/images/ok.png' class='accessGranted' />"} -{assign var=accesInvalid value="<img src='plugins/UsersManager/images/no-access.png' class='updateAccess' />"} -{foreach from=$usersAccessByWebsite key=login item=access} -<tr> - <td id='login'>{$login}</td> - <td id='noaccess'>{if $access=='noaccess' and $idSiteSelected!='all'}{$accesValid}{else}{$accesInvalid}{/if} </td> - <td id='view'>{if $access=='view' and $idSiteSelected!='all'}{$accesValid}{else}{$accesInvalid}{/if} </td> - <td id='admin'>{if $access=='admin' and $idSiteSelected!='all'}{$accesValid}{else}{$accesInvalid}{/if} </td> -</tr> -{/foreach} -</tbody> -</table> +<div class="entityContainer" style='width:500px'> + <table class="entityTable dataTable" id="access"> + <thead> + <tr> + <th class='first'>{'UsersManager_User'|translate}</th> + <th>{'UsersManager_PrivNone'|translate}</th> + <th>{'UsersManager_PrivView'|translate}</th> + <th>{'UsersManager_PrivAdmin'|translate}</th> + </tr> + </thead> + + <tbody> + {assign var=accesValid value="<img src='plugins/UsersManager/images/ok.png' class='accessGranted' />"} + {assign var=accesInvalid value="<img src='plugins/UsersManager/images/no-access.png' class='updateAccess' />"} + {foreach from=$usersAccessByWebsite key=login item=access} + <tr> + <td id='login'>{$login}</td> + <td id='noaccess'>{if $access=='noaccess' and $idSiteSelected!='all'}{$accesValid}{else}{$accesInvalid}{/if} </td> + <td id='view'>{if $access=='view' and $idSiteSelected!='all'}{$accesValid}{else}{$accesInvalid}{/if} </td> + <td id='admin'>{if $access=='admin' and $idSiteSelected!='all'}{$accesValid}{else}{$accesInvalid}{/if} </td> + </tr> + {/foreach} + </tbody> + </table> +</div> <div class="dialog" id="confirm"> <p>{'UsersManager_ChangeAllConfirm'|translate:"<span id='login'></span>"}</p> @@ -102,7 +96,8 @@ {ajaxErrorDiv id=ajaxErrorUsersManagement} {ajaxLoadingDiv id=ajaxLoadingUsersManagement} - <table class="admin" id="users"> + <div class="entityContainer" style='margin-bottom:50px'> + <table class="entityTable dataTable" id="users"> <thead> <tr> <th>{'General_Username'|translate}</th> @@ -124,15 +119,15 @@ <td id="email" class="editable">{$user.email}</td> <td id="alias" class="editable">{$user.alias}</td> <td id="alias">{$user.token_auth}</td> - <td><img src='plugins/UsersManager/images/edit.png' class="edituser" id="row{$i}" href='#' /></td> - <td><img src='plugins/UsersManager/images/remove.png' class="deleteuser" id="row{$i}" value="Delete" /></td> + <td><span class="edituser link_but" id="row{$i}"><img title="{'General_Edit'|translate}" src='themes/default/images/ico_edit.png' /> {'General_Edit'|translate} </span></td> + <td><span class="deleteuser link_but" id="row{$i}"><img title="{'General_Delete'|translate}" src='themes/default/images/ico_delete.png' /> {'General_Delete'|translate} </span></td> </tr> {/if} {/foreach} </tbody> </table> - - <div class="addrow"><a href="#"><img src='plugins/UsersManager/images/add.png' /> {'UsersManager_AddUser'|translate}</a></div> + <div class="addrow"><img src='plugins/UsersManager/images/add.png' /> {'UsersManager_AddUser'|translate}</div> + </div> {/if} {include file="CoreAdminHome/templates/footer.tpl"} diff --git a/plugins/UsersManager/templates/userSettings.tpl b/plugins/UsersManager/templates/userSettings.tpl index ee30a16908..d8286470dd 100644 --- a/plugins/UsersManager/templates/userSettings.tpl +++ b/plugins/UsersManager/templates/userSettings.tpl @@ -5,7 +5,7 @@ <h2>{'UsersManager_MenuUserSettings'|translate}</h2> <br /> -<table id='userSettingsTable' class="adminTable adminTableNoBorder" style='width:1000px'> +<table id='userSettingsTable' class="adminTable" style='width:1000px'> <tr> <td><label for="username">{'General_Username'|translate} </label></td> <td> @@ -89,7 +89,7 @@ {ajaxErrorDiv id=ajaxErrorAnonymousUserSettings} {ajaxLoadingDiv id=ajaxLoadingAnonymousUserSettings} - <table id='anonymousUserSettingsTable' class="adminTable adminTableNoBorder" style='width:850px'> + <table id='anonymousUserSettingsTable' class="adminTable" style='width:850px'> <tr> <td style='width:400px'>{'UsersManager_WhenUsersAreNotLoggedInAndVisitPiwikTheyShouldAccess'|translate}</td> <td> diff --git a/plugins/VisitorGenerator/templates/generate.tpl b/plugins/VisitorGenerator/templates/generate.tpl index 5c49a85963..0a6a962e6e 100644 --- a/plugins/VisitorGenerator/templates/generate.tpl +++ b/plugins/VisitorGenerator/templates/generate.tpl @@ -4,7 +4,7 @@ <h2>{'VisitorGenerator_VisitorGenerator'|translate}</h2> -<table class="adminTable adminTableNoBorder" style="width: 600px;"> +<table class="entityTable dataTable" style="width: 600px;"> <thead> <tr> <th>{'General_Visitors'|translate}</th> diff --git a/plugins/VisitorGenerator/templates/index.tpl b/plugins/VisitorGenerator/templates/index.tpl index 269bb3ee72..edf3161565 100644 --- a/plugins/VisitorGenerator/templates/index.tpl +++ b/plugins/VisitorGenerator/templates/index.tpl @@ -6,7 +6,7 @@ <p>{'VisitorGenerator_PluginDescription'|translate}</p> <form method="POST" action="{url module=VisitorGenerator action=generate}"> -<table class="adminTable adminTableNoBorder" style="width: 600px;"> +<table class="adminTable" style="width: 600px;"> <tr> <td><label for="idSite">{'General_ChooseWebsite'|translate}</label></td> <td><select name="idSite"> diff --git a/themes/default/common.css b/themes/default/common.css index ce1eee2a20..0d3cf65c3e 100644 --- a/themes/default/common.css +++ b/themes/default/common.css @@ -496,6 +496,10 @@ a { font-size:8pt; line-height:140%; } +div.ui-state-highlight { + border-color:#545903; + background-color:#FFFFD6; +} .ui-datepicker{ border: 1px solid #fff!important; @@ -628,7 +632,10 @@ select { .admin .submit { margin-left:50px; float:none; - +} + +.admin .entityContainer .submit { + margin:0; } .entityContainer .link_but { white-space:nowrap; @@ -652,7 +659,7 @@ select { } /* Add / Edit / List entities */ -.entityContainer{ +.entityContainer { width:800px; font-size:14px; } @@ -686,7 +693,9 @@ select { table.entityTable tr td a { text-decoration:underline; } - +.entityTable tr.highlight td { + background-color: #ECF9DD; +} /* cancel button below Forms */ .entityCancel { diff --git a/themes/default/common.js b/themes/default/common.js index 43ce060a28..11faef046d 100644 --- a/themes/default/common.js +++ b/themes/default/common.js @@ -129,7 +129,17 @@ piwikHelper.getStandardAjaxConf = function(loadingDivID, errorDivID, params) return ajaxRequest; } -piwikHelper.redirectToUrl = function(url) { +piwikHelper.refreshAfter = function(timeoutPeriod) +{ + if(timeoutPeriod == 0) { + location.reload(true); + } else { + setTimeout("location.reload(true);",timeoutPeriod); + } +} + +piwikHelper.redirectToUrl = function(url) +{ window.location = url; } diff --git a/themes/default/ieonly.css b/themes/default/ieonly.css index a6a672906a..6635ee02c5 100644 --- a/themes/default/ieonly.css +++ b/themes/default/ieonly.css @@ -44,10 +44,3 @@ ol#menuList li, ul#widgetList li .button, margin-top: 0!important; } -/* backgroud colors of plugins table*/ -*+html .adminTable thead th { - background-color:#464646!important; -} -*+html .adminTable .active td { - background-color:#ECF9DD!important; -} |