Fixed lots of bug, removed some not wanted functionality and added a menu
This commit is contained in:
parent
a60c2a9795
commit
7e151f67f4
4 changed files with 39 additions and 19 deletions
|
@ -4,8 +4,12 @@ message = Let's start
|
|||
main_list = ToDo Lists
|
||||
back_button = Back
|
||||
add_list = Add list
|
||||
settings = Settings
|
||||
about = About
|
||||
create_list = Create list
|
||||
new_list = New list
|
||||
new_list_name = Name:
|
||||
add_new_list = Add new list
|
||||
add_new_list = Add new list
|
||||
add_new_item = Add new item
|
||||
delete_list = Delete list
|
||||
home_list_menu = Lists
|
||||
settings_menu = Settings
|
||||
about_menu = About
|
|
@ -1,11 +1,15 @@
|
|||
app_title = Lista de tareas
|
||||
app_description.innerHTML = Lista de tareas. ¡Que no se te olvide nada!
|
||||
message = Comenzar
|
||||
app_description.innerHTML = Lista de Tareas. ¡Nunca olvides nada!
|
||||
message = Empecemos
|
||||
main_list = Listas de tareas
|
||||
back_button = Atrás
|
||||
add_list = Añadir lista
|
||||
settings = Ajustes
|
||||
about = Acerca de
|
||||
create_list = Crear lista
|
||||
new_list = Nueva lista
|
||||
new_list_name = Nombre:
|
||||
add_new_list = Añadir nueva lista
|
||||
add_new_list = Añadir nueva lista
|
||||
add_new_item = Añadir nuevo item
|
||||
delete_list = Borrar lista
|
||||
home_list_menu = Listas
|
||||
settings_menu = Ajustes
|
||||
about_menu = Acerca de...
|
27
index.html
27
index.html
|
@ -27,16 +27,16 @@
|
|||
<body>
|
||||
<div id="afui">
|
||||
<div class="view" id="mainview">
|
||||
<header>
|
||||
<header>
|
||||
<h1 data-l10n-id="app_title">ToDo List</h1>
|
||||
</header>
|
||||
<div class="pages">
|
||||
<div data-title="ToDo Lists" id="main" class="panel" selected="true">
|
||||
<div id="main" class="panel" selected="true">
|
||||
<ul id="list_of_lists" class="list">
|
||||
<li id="add_list_last_elem"><a id="add_list" data-l10n-id="add_list"><span class="icon add"></span> Add List</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div data-title="New list" id="new_list" class="panel" selected="false">
|
||||
<div id="new_list" class="panel" selected="false">
|
||||
<div class="formGroupHead" data-l10n-id="create_list">Create list</div>
|
||||
<form>
|
||||
<label for="new_list_name_input" data-l10n-id="new_list_name">Name:</label>
|
||||
|
@ -44,7 +44,8 @@
|
|||
<a id="add_new_list_button" class="button icon add" data-l10n-id="add_new_list">Add new list</a>
|
||||
</form>
|
||||
</div>
|
||||
<div data-title="Untitled" id="list_panel" class="panel" selected="false">
|
||||
<div data-footer="none" id="list_panel" class="panel" selected="false">
|
||||
<h2 id="list_title"></h2>
|
||||
<ul id="list_display" class="list">
|
||||
<input id="new_elem_text" type="text" />
|
||||
<a id="add_new_item" class="button icon add" data-l10n-id="add_new_item">Add new item</a>
|
||||
|
@ -52,13 +53,21 @@
|
|||
<a id="delete_list" class="button icon remove red" data-l10n-id="delete_list">Delete list</a>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- <div data-title="Settings" id="settings" class="panel" selected="false">
|
||||
<p>Coming soon...</p>
|
||||
<div id="settings" class="panel" selected="false">
|
||||
<h2 data-l10n-id="data_settings">Data settings</h2>
|
||||
<hr />
|
||||
<a id="reset_app" class="button red" data-l10n-id="reset_app">Reset app</a>
|
||||
<p data-l10n-id="reset_warning">Warning: It will remove all data.</p>
|
||||
</div>
|
||||
<div id="about" class="panel" selected="false">
|
||||
<p>Coming soon...</p>
|
||||
</div>
|
||||
<div data-title="About" id="about" class="panel" selected="false">
|
||||
<p>Coming soon...</p>
|
||||
</div> -->
|
||||
</div>
|
||||
<footer>
|
||||
<a href="#main" class="icon stack" data-l10n-id="home_list_menu">Lists</a>
|
||||
<a href="#settings" class="icon settings" data-l10n-id="settings_menu">Settings</a>
|
||||
<a href="#about" class="icon info" data-l10n-id="about_menu">Lists</a>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
function openList(elementClicked) {
|
||||
var listID = elementClicked.data('listID');
|
||||
var listTitle = getListTitle(listID);
|
||||
$('#list_title').text(listTitle);
|
||||
$('ul#list_display').find('li').remove();
|
||||
|
||||
var numElements = getListItemCount(listID);
|
||||
|
@ -34,7 +35,6 @@ function openList(elementClicked) {
|
|||
$('#add_new_item').data('currentlist', listID);
|
||||
$('#delete_list').data('currentlist', listID);
|
||||
$.afui.loadContent('#list_panel', false, false, "slide");
|
||||
$.afui.setTitle(listTitle);
|
||||
}
|
||||
|
||||
function itemClicked(elementClicked) {
|
||||
|
@ -119,10 +119,13 @@ window.addEventListener('DOMContentLoaded', function() {
|
|||
// https://developer.mozilla.org/Web/API/Element.innerHTML#Security_considerations
|
||||
// message.textContent = translate('message');
|
||||
|
||||
$('#main').data('title', translate('main_list'));
|
||||
|
||||
loadLists();
|
||||
|
||||
$('#add_list').click(function(){
|
||||
$.afui.loadContent('#new_list', false, false, "slide");
|
||||
// $.afui.setTitle(translate('new_list'));
|
||||
});
|
||||
|
||||
$('#add_new_list_button').click(function(){
|
||||
|
@ -154,4 +157,4 @@ window.addEventListener('DOMContentLoaded', function() {
|
|||
deleteListClicked(listID);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue