|
Check-in Number:
|
447 | |
| Date: |
2009-Oct-29 02:56:27 (local)
2009-Oct-29 09:56:27 (UTC) |
| User: | majid |
| Branch: | |
| Comment: |
bug fixes for MainView, UI optimization for iPhone
|
| Tickets: |
|
| Inspections: |
|
| Files: |
|
temboz/pages/view.tmpl 1.79 -> 1.80
--- /tmp/T0uBaiH4 Mon Sep 6 18:20:46 2010
+++ /tmp/T1vBaiH4 Mon Sep 6 18:20:46 2010
@@ -84,6 +84,7 @@
<html>
<head><title>Temboz - $item_desc items</title>
<meta name="robots" content="noarchive,noindex,follow,nocache">
+<meta name="viewport" content="initial-scale=1.0">
########################################################################
##
## This script handle Thumbs up/down using the XMLHttpRequest method
@@ -237,8 +238,13 @@
\$(document).bind("keydown", "meta+ctrl+z", unhide_last);
\$(document).bind("keydown", "ctrl+meta+z", unhide_last);
var articles = \$("div.article");
- articles.each(assign_column);
- \$("span#count").html(String(articles.size()));
+ \$("b#count").html(String(articles.size()));
+## use only one column for browsers with less than 600px wide
+ if(\$("body").width() < 800) {
+ \$("div#initial").removeClass("col1");
+ } else {
+ articles.each(assign_column);
+ }
});
init_popups();
</script>
@@ -257,7 +263,7 @@
#end if
########################################################################
#def CONTEXT_MENU
-<span id="count">???</span>
+<b id="count">?</b>
#def RATING_CALLOUT($item_desc)
<a id="rating" class="callout"><u>$item_desc</u> <small>▼</small></a>
#end def
@@ -264,6 +270,8 @@
$RATING_CALLOUT($item_desc)
sorted by
<a id="sort" class="callout"><u>$sort_desc</u> <small>▼</small></a>
+
+ <a id="view" class="callout"><u>More</u> <small>▼</small></a>
<div id="popup_sort" class="popup">
<ul>
#for (sort_name, sort_desc, discard, discard) in $sorts
@@ -272,8 +280,6 @@
#end for
</ul>
</div>
-
- <a id="view" class="callout"><u>More</u> <small>▼</small></a>
<div id="popup_view" class="popup">
<ul>
<li><a href="javascript:unhide_last();">Undo last hide (Ctrl-Z)</a></li>
temboz/singleton.py 1.31 -> 1.32
--- /tmp/T0xEaWH4 Mon Sep 6 18:20:46 2010
+++ /tmp/T1yEaWH4 Mon Sep 6 18:20:46 2010
@@ -92,7 +92,7 @@
time.sleep(backoff)
backoff = min(backoff * 2, 5.0)
elapsed = time.time() - before
- if param.get('debug_sql', False):
+ if getattr(param, 'debug_sql', False):
if elapsed > 5.0:
print >> param.log, 'Slow SQL:', elapsed, args, kwargs
if param.debug:
temboz/update.py 1.71 -> 1.72
--- /tmp/T0OEayI4 Mon Sep 6 18:20:46 2010
+++ /tmp/T1PEayI4 Mon Sep 6 18:20:46 2010
@@ -820,14 +820,15 @@
except:
util.print_stack()
-def view_sql(c, where_clause, sort, params, overload_threshold):
+def view_sql(c, where, sort, params, overload_threshold):
c.execute("""create temp table articles as select
item_uid, item_creator, item_title, item_link, item_content,
datetime(item_loaded), date(item_created) as item_created,
julianday('now') - julianday(item_created) as delta_created, item_rating,
- item_rule_uid, item_feed_uid
- from fm_items
- where """ + where_clause + """ limit ?""",
+ item_rule_uid, item_feed_uid, feed_title, feed_html, feed_xml
+ from fm_items, v_feeds_snr
+ where item_feed_uid=feed_uid and """ + where + """
+ order by """ + sort + """ limit ?""",
params + [overload_threshold])
c.execute("""create index articles_i on articles(item_uid)""")
c.execute("""select tag_item_uid, tag_name, tag_by
@@ -835,7 +836,6 @@
tag_dict = dict()
for item_uid, tag_name, tag_by in c:
tag_dict.setdefault(item_uid, []).append(tag_name)
- c.execute("""select articles.*, feed_title, feed_html, feed_xml
- from articles, v_feeds_snr
- where item_feed_uid=feed_uid order by """ + sort + """, item_uid DESC""")
+ c.execute("""select * from articles
+ order by """ + sort + """, item_uid DESC""")
return tag_dict