diff --git a/todo-mobile.css b/todo-mobile.css index f88eddb..e4a8f9d 100644 --- a/todo-mobile.css +++ b/todo-mobile.css @@ -132,3 +132,8 @@ img.ui-datepicker-trigger { display: inline-block; margin-right: 20px; } +.todotitleonly { + display: inline-block; + width: 250px; + white-space: normal; +} diff --git a/todo-mobile.js b/todo-mobile.js index 6a9dee1..56e032a 100644 --- a/todo-mobile.js +++ b/todo-mobile.js @@ -1,12 +1,3 @@ -// source: http://stackoverflow.com/questions/1199352/smart-way-to-shorten-long-strings-with-javascript -String.prototype.trunc = - function(n,useWordBoundary){ - var toLong = this.length>n, - s_ = toLong ? this.substr(0,n-1) : this; - s_ = useWordBoundary && toLong ? s_.substr(0,s_.lastIndexOf(' ')) : s_; - return toLong ? s_ + '…' : s_; - }; - /* $(document).on("pagebeforeshow", '#modifyPage', function(e, data) { alert(JSON.stringify(data).replace(/,/g,"\n").replace(/[{}\"]/g, "")); @@ -52,8 +43,7 @@ function renderItem(it, lineNr) { ''+ - it.todo.trunc(30, false)+ + '">'+ it.todo+''+ (hasNote ? '':'')+ (isRecurring ? '':'')+ ((it.completed==0 && dueDate != null && (today - dueDate) > 0) ?