Skip to content

Commit

Permalink
new look with add moved to header, little code cleanup for swipedelete
Browse files Browse the repository at this point in the history
  • Loading branch information
llad committed Apr 25, 2011
1 parent de629a3 commit 01c705e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
8 changes: 4 additions & 4 deletions code.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ $(function(){
// Render the template with the template data and insert
// the rendered HTML under the "templateList" element
$.tmpl( "templatesTemplate", getPltz() )
.insertAfter( "#templateList" );
.insertAfter( "#listart" );
$('.ui-listview').listview('refresh');

$(function(){
Expand All @@ -131,7 +131,7 @@ $(function(){
plt[name] = field.value;
});
savePlt(plt);
$.mobile.changePage('list');
$.mobile.changePage('list','pop',true);
return false;
});
});
Expand All @@ -148,7 +148,7 @@ $(function(){
plt.id = editID;
console.log(plt.id);
savePlt(plt);
$.mobile.changePage('list');
$.mobile.changePage('list','pop',true);
return false;
});
});
Expand Down Expand Up @@ -184,7 +184,7 @@ $(function(){
}
else {
$('.aDeleteBtn').remove();
$('.plt').unbind('tap click');
$('.swipedelete').unbind('tap click');
}
});
});
Expand Down
26 changes: 9 additions & 17 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,32 @@
<body>



<!-- Start of first page -->

<div data-role="page" id="list" class="swipedelete">
<div data-role="page" id="list" class="swipedelete" data-theme="d">

<div data-role="header">
<h1>lone empltz</h1>
<h1>empltz for Templates</h1>
<a href="#add" data-rel="dialog" data-icon="plus" class="ui-btn-right" data-iconpos="notext">Add</a>
</div><!-- /header -->


<div data-role="content">
<ul data-role="listview" data-inset="true" data-split-icon="gear" data-split-theme="c" data-dividertheme="b">
<li id="templateList" data-role="list-divider">Email Templates</li>
<li id="addButton" data-theme="a"><a href="#add" data-rel="dialog">Add</a></li>
<ul id="templateList" data-role="listview" data-inset="true" data-split-icon="gear">
<li id="listart" data-role="list-divider"></li>
<li id="liend" data-role="list-divider"></li>
</ul>
<p><b>hint:</b> Swipe to delete </p>

</div><!-- /content -->

<div data-role="footer">
<h4>Worksplayz</h4>
</div><!-- /header -->
</div><!-- /page -->

<!-- Start of second page -->
<div data-role="page" id="edit">

<div data-role="header">
<h1>Editing</h1>
<h1>Edit</h1>
</div><!-- /header -->

<div data-role="content">
Expand All @@ -51,10 +48,8 @@ <h1>Editing</h1>
</form>
</div><!-- /content -->

<div data-role="footer">
<h4>Forking Spoon</h4>
</div><!-- /header -->
</div><!-- /page -->

<!-- Start of second page -->
<div data-role="page" id="add">

Expand All @@ -70,9 +65,6 @@ <h1>Add</h1>
</form>
</div><!-- /content -->

<div data-role="footer">
<h4>Forking Spoon</h4>
</div><!-- /header -->
</div><!-- /page -->


Expand Down

0 comments on commit 01c705e

Please sign in to comment.