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:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-04-27 10:54:11 +0400
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-04-27 10:54:11 +0400
commita919eb4c38f83cec4385aeb0aac1e77437b7356d (patch)
tree7e7915c704de3f67567fadeeb718692781d754d5 /plugins
parent27d504bbfee895d5725918fc7ef71e2e957a8517 (diff)
fixing broken dashboard when loading old layout format from DB
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Dashboard/Controller.php21
-rw-r--r--plugins/Goals/templates/overview.tpl1
-rw-r--r--plugins/Login/Auth.php3
-rw-r--r--plugins/SitesManager/templates/SitesManager.js66
4 files changed, 45 insertions, 46 deletions
diff --git a/plugins/Dashboard/Controller.php b/plugins/Dashboard/Controller.php
index 331f84437b..f270efaf0d 100644
--- a/plugins/Dashboard/Controller.php
+++ b/plugins/Dashboard/Controller.php
@@ -17,22 +17,27 @@ require_once "ViewDataTable.php";
*/
class Piwik_Dashboard_Controller extends Piwik_Controller
{
- public function embeddedIndex()
+ protected function getDashboardView($template)
{
- $view = new Piwik_View('Dashboard/templates/index.tpl');
+ $view = new Piwik_View($template);
$this->setGeneralVariablesView($view);
- $view->layout = html_entity_decode($this->getLayout());
-
+ $layout = html_entity_decode($this->getLayout());
+ if(strstr($layout, '[[') == false) {
+ $layout = "'$layout'";
+ }
$view->availableWidgets = json_encode(Piwik_GetWidgetsList());
+ return $view;
+ }
+
+ public function embeddedIndex()
+ {
+ $view = $this->getDashboardView('Dashboard/templates/index.tpl');
echo $view->render();
}
public function index()
{
- $view = new Piwik_View('Dashboard/templates/standalone.tpl');
- $this->setGeneralVariablesView($view);
- $view->layout = html_entity_decode($this->getLayout());
- $view->availableWidgets = json_encode(Piwik_GetWidgetsList());
+ $view = $this->getDashboardView('Dashboard/templates/standalone.tpl');
echo $view->render();
}
diff --git a/plugins/Goals/templates/overview.tpl b/plugins/Goals/templates/overview.tpl
index f87b72b1bf..1e342840dc 100644
--- a/plugins/Goals/templates/overview.tpl
+++ b/plugins/Goals/templates/overview.tpl
@@ -17,7 +17,6 @@
{/foreach}
{if $userCanEditGoals}
- <hr style="margin:30px 0px">
{include file=Goals/templates/add_edit_goal.tpl}
{/if}
diff --git a/plugins/Login/Auth.php b/plugins/Login/Auth.php
index f5aec5f709..61e1c67a50 100644
--- a/plugins/Login/Auth.php
+++ b/plugins/Login/Auth.php
@@ -37,9 +37,6 @@ class Piwik_Login_Auth implements Piwik_Auth
return new Piwik_Auth_Result(Piwik_Auth_Result::SUCCESS, $login, $this->token_auth );
}
}
- $authCookieName = Zend_Registry::get('config')->General->login_cookie_name;
- $authCookie = new Piwik_Cookie($authCookieName);
- $authCookie->delete();
return new Piwik_Auth_Result( Piwik_Auth_Result::FAILURE, $this->login, $this->token_auth );
}
diff --git a/plugins/SitesManager/templates/SitesManager.js b/plugins/SitesManager/templates/SitesManager.js
index 48bcab165d..e21e7a2e2d 100644
--- a/plugins/SitesManager/templates/SitesManager.js
+++ b/plugins/SitesManager/templates/SitesManager.js
@@ -92,8 +92,7 @@ $(document).ready( function() {
var idRow = $(this).attr('id');
var nameToDelete = $(this).parent().parent().find('#siteName').html();
var idsiteToDelete = $(this).parent().parent().find('#idSite').html();
- if(confirm(sprintf(_pk_translate('SitesManager_DeleteConfirm_js'),'"'+nameToDelete+'" (idSite = '+idsiteToDelete+')')) )
- {
+ if(confirm(sprintf(_pk_translate('SitesManager_DeleteConfirm_js'),'"'+nameToDelete+'" (idSite = '+idsiteToDelete+')')) ) {
$.ajax( getDeleteSiteAJAX( idsiteToDelete ) );
}
}
@@ -102,38 +101,37 @@ $(document).ready( function() {
var alreadyEdited = new Array;
$('.editSite')
.click( function() {
- ajaxHideError();
- var idRow = $(this).attr('id');
- if(alreadyEdited[idRow]==1) return;
- 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')
- {
- var contentAfter = '<input id="'+idName+'" value="'+contentBefore+'" size="25">';
- $(n)
- .html(contentAfter)
- .keypress( submitSiteOnEnter );
- }
- if(idName == 'urls')
- {
- var contentAfter = '<textarea cols=30 rows=3 id="urls">'+contentBefore.replace(/<br *\/? *>/gi,"\n")+'</textarea>';
- $(n).html(contentAfter);
- }
- }
- );
-
- $(this)
- .toggle()
- .parent()
- .prepend( $('<img src="plugins/UsersManager/images/ok.png" class="updateSite">')
- .click( function(){ $.ajax( getUpdateSiteAJAX( $('tr#'+idRow) ) ); } )
- );
- }
+ ajaxHideError();
+ var idRow = $(this).attr('id');
+ if(alreadyEdited[idRow]==1) return;
+ 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')
+ {
+ var contentAfter = '<input id="'+idName+'" value="'+contentBefore+'" size="25">';
+ $(n)
+ .html(contentAfter)
+ .keypress( submitSiteOnEnter );
+ }
+ if(idName == 'urls')
+ {
+ var contentAfter = '<textarea cols=30 rows=3 id="urls">'+contentBefore.replace(/<br *\/? *>/gi,"\n")+'</textarea>';
+ $(n).html(contentAfter);
+ }
+ }
+ );
+ $(this)
+ .toggle()
+ .parent()
+ .prepend( $('<img src="plugins/UsersManager/images/ok.png" class="updateSite">')
+ .click( function(){ $.ajax( getUpdateSiteAJAX( $('tr#'+idRow) ) ); } )
+ );
+ }
);
$('td.editableSite').click( function(){ $(this).parent().find('.editSite').click(); } );