diff options
author | sgiehl <stefangiehl@gmail.com> | 2011-05-06 11:25:39 +0400 |
---|---|---|
committer | sgiehl <stefangiehl@gmail.com> | 2011-05-06 11:25:39 +0400 |
commit | 2dc0a7bba7e3fc85f3a9a12152aa29a53fe14e03 (patch) | |
tree | 8946130fcb77a47d2fc7d531d9c8f61100645e7c /plugins/SitesManager | |
parent | 7576e8bd0211df9d9a52ff0b9c78cab59ebb4737 (diff) |
refs #2123 replaced last confirm with dialog (site deletion)
git-svn-id: http://dev.piwik.org/svn/trunk@4648 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/SitesManager')
-rw-r--r-- | plugins/SitesManager/templates/SitesManager.js | 8 | ||||
-rw-r--r-- | plugins/SitesManager/templates/SitesManager.tpl | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/plugins/SitesManager/templates/SitesManager.js b/plugins/SitesManager/templates/SitesManager.js index f6d47ea625..e7899ca7ec 100644 --- a/plugins/SitesManager/templates/SitesManager.js +++ b/plugins/SitesManager/templates/SitesManager.js @@ -171,9 +171,11 @@ function SitesManager ( _timezones, _currencies, _defaultTimezone, _defaultCurre var idRow = $(this).attr('id'); var nameToDelete = $(this).parent().parent().find('input#siteName').val() || $(this).parent().parent().find('td#siteName').html(); var idsiteToDelete = $(this).parent().parent().find('#idSite').html(); - if(confirm(sprintf(_pk_translate('SitesManager_DeleteConfirm_js'),'"'+nameToDelete+'" (idSite = '+idsiteToDelete+')')) ) { - $.ajax( getDeleteSiteAJAX( idsiteToDelete ) ); - } + + $('#confirm h2').text(sprintf(_pk_translate('SitesManager_DeleteConfirm_js'),'"'+nameToDelete+'" (idSite = '+idsiteToDelete+')')); + piwikHelper.windowModal('#confirm', function(){ + $.ajax( getDeleteSiteAJAX( idsiteToDelete ) ); + }); } ); diff --git a/plugins/SitesManager/templates/SitesManager.tpl b/plugins/SitesManager/templates/SitesManager.tpl index 9d83f206d3..a933b75286 100644 --- a/plugins/SitesManager/templates/SitesManager.tpl +++ b/plugins/SitesManager/templates/SitesManager.tpl @@ -94,6 +94,12 @@ vertical-align:middle; {if $adminSites|@count == 0} {'SitesManager_NoWebsites'|translate} {else} + <div class="ui-confirm" id="confirm"> + <h2></h2> + <input id="yes" type="button" value="{'General_Yes'|translate}" /> + <input id="no" type="button" value="{'General_No'|translate}" /> + </div> + <div class="entityContainer"> {if $isSuperUser} {$createNewWebsite} |