mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
replace #settings_btn with data- attribute (for possible multiple links to settings)
This commit is contained in:
parent
18f9c0309f
commit
21037bb4d0
2 changed files with 11 additions and 4 deletions
|
|
@ -590,8 +590,11 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
|
||||
|
||||
// Settings
|
||||
$("#settings_btn").click(function(event){
|
||||
showSettings( (event.metaKey || event.ctrlKey) ? 1 : 0 );
|
||||
$("a[data-settings-link]").click(function(event){
|
||||
var settingsPage = this.dataset.settingsLink;
|
||||
if (settingsPage == 'index') {
|
||||
showSettings( (event.metaKey || event.ctrlKey) ? 1 : 0 );
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
|
|
@ -600,7 +603,11 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
return false;
|
||||
});
|
||||
|
||||
$(document).on('click', '.mtt-back-button', function(){ _mtt.pageBack(true); this.blur(); return false; } );
|
||||
$(document).on('click', '.mtt-back-button', function() {
|
||||
_mtt.pageBack(true);
|
||||
this.blur();
|
||||
return false;
|
||||
});
|
||||
|
||||
$(window).bind('beforeunload', function() {
|
||||
if (_mtt.pages.current && _mtt.pages.current.page == 'taskedit' && flag.editFormChanged) {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ $().ready(function(){
|
|||
<div class="topblock-bar">
|
||||
<div id="msg"><span class="msg-text"></span><div class="msg-details"></div></div>
|
||||
<div class="bar-menu">
|
||||
<a href="#settings" id="settings_btn" class="mtt-only-authorized"><?php _e('a_settings');?></a>
|
||||
<a href="#settings" class="mtt-only-authorized" data-settings-link="index"><?php _e('a_settings');?></a>
|
||||
<span id="bar_public" style="display:none" class="mtt-need-auth-enabled"><?php _e('public_tasks');?></span>
|
||||
<a href="#login" id="login_btn" class="mtt-need-auth-enabled"><?php _e('a_login');?></a>
|
||||
<a href="#logout" id="logout_btn" class="mtt-need-auth-enabled" style="display:none" ><?php _e('a_logout');?></a>
|
||||
|
|
|
|||
Loading…
Reference in a new issue