Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

debugging edit link

  • Loading branch information...
commit 451c2273a5e0517ee5bc6d63cc74720c40f88b22 1 parent ff7af96
@schuyler1d authored
Showing with 37 additions and 11 deletions.
  1. +6 −0 README.md
  2. +3 −0  index.html
  3. +8 −2 js/signs.js
  4. +20 −9 js/store.js
View
6 README.md
@@ -0,0 +1,6 @@
+ASL SignWriting Dictionary
+
+Learn sign language so you can chat and flirt at death metal concerts and loud bars! Also tap into the rich American Deaf culture.
+
+This application is targeted to those familiar with at least the alphabet and several signs. Using SignWriting, an ideographic writing system for sign language, we store over 8000 signs on your device without the need for an Internet connection. The icons communicate hand shape, context and movement, but there are no illustrations or videos. If you are looking for a smaller dictionary with easy-to-understand illustrations, try "ASL Ultimate" on the Android.
+
View
3  index.html
@@ -65,6 +65,9 @@ <h2 id="terms" style="text-overflow:inherit;white-space:normal;"></h2>
<div data-role="content" style="background-color:white;">
<div id="text"></div>
<canvas id="canvas" width="300" height="400"></canvas>
+ <div id="signdisplay-controls">
+ <a id="signdisplay-edit-link" href="composer.html" data-rel="dialog">edit</a>
+ </div>
</div> <!-- /content signdisplay -->
</div><!-- /page signdisplay -->
View
10 js/signs.js
@@ -43,10 +43,15 @@ SkyInterface.prototype = {
});
});
$('#composer-page').live('pagebeforeshow',function(event,ui){
+ console.log('onbeforepage');
if (self.composer)
self.composer.switchMode(self.composer_mode);
});
-
+ $('#signdisplay-edit-link').click(function() {
+ console.log('onclick');
+ self.composer_mode = 'composer';
+ self.composer.loadEntry(self.current_entry);
+ });
jQuery('#ajaxtest button').click(this.ajax);
try { // this will fail if openDatabase returns NULL
this.checkloaded();
@@ -101,7 +106,8 @@ SkyInterface.prototype = {
},
showTerm:function(entry) {
var self = this;
- self.viewer.clear();//remove any previous sign
+ this.viewer.clear();//remove any previous sign
+ this.current_entry = entry;
this.dict.getEntry(entry,function(x) {
switch(x.type) {
case 'entry':
View
29 js/store.js
@@ -13,19 +13,30 @@ if (window.openDatabase) {
);
});
},
- getEntry:function(entry,cb) {
+ getEntry:function(entry,cb,opts) {
this.db.transaction(function(tx) {
tx.executeSql("SELECT * FROM entries WHERE entry=?",[entry],
- function(tx,res) { cb({'type':"entry",'item':res.rows.item(0)}); });
+ function(tx,res) { cb({'type':"entry",'item':res.rows.item(0)}); });
tx.executeSql("SELECT * FROM terms WHERE entry=?",[entry],
- function(tx,res) {
- var terms = [];
- for (var i=0;i<res.rows.length;i++) {
- terms.push(res.rows.item(i).term);
- }
- cb({'type':"terms",'item':terms,'results':res});
- });
+ function(tx,res) {
+ var terms = [];
+ for (var i=0;i<res.rows.length;i++) {
+ terms.push(res.rows.item(i).term);
+ }
+ cb({'type':"terms",'item':terms,'results':res});
+ });
+ if (opts && opts.tags) {
+ tx.executeSql("SELECT * FROM tags WHERE entry=?",[entry],
+ function(tx,res) {
+ var tags = [];
+ for (var i=0;i<res.rows.length;i++) {
+ tags.push(res.rows.item(i));
+ }
+ cb({'type':"tags",'item':tags,'results':res});
+ });
+ }
});
+
},
updateEntry:function(cols,terms,callback) {
var self = this;
Please sign in to comment.
Something went wrong with that request. Please try again.