Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: Quimera/tasksplease
base: 3e7ae304a5
...
head fork: Quimera/tasksplease
compare: 6ecae4627d
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 3 additions and 2 deletions.
  1. +2 −2 jquery.tasksplease.js
  2. +1 −0  jquery.tasksplease.min.js
4 jquery.tasksplease.js
View
@@ -130,8 +130,8 @@
//default settings
var settings = {
- 'sorteable': true, //allow sorting?
- };
+ 'sorteable': true //allow sorting?
+ }
if (options) {
$.extend(settings, options);
1  jquery.tasksplease.min.js
View
@@ -0,0 +1 @@
+(function(b){function h(e){var a=this,f;b.extend(a,{init:function(){a.setup()},create_task:function(d){var c=b("<li/>");c.text(d);c.append('<span class="remove">'+tp_i18n.delete_task+"</span>");a.delete_event(c.find(".remove"),c);f.append(c);return c},setup:function(){var d=[];f=b('<ul class="tasksplease"/>');var c=e.val();void 0!==c[0]&&(d=c.split("\n"));b.each(d,function(b,c){a.create_task(c,b)});a.container=b('<div class="tasksplease-container"/>');d=b('<textarea type="text" name="task-description" class="task-description" rows="1" placeholder="'+ tp_i18n.add_task+'"></textarea>');a.container.append(f).append(d).append('<input class="add_task" type="submit" value="'+tp_i18n.add+'"/>');e.after(a.container);a.add_new_event(a.container.find(".add_task"));e.hide()},add_new_event:function(d){b(d).click(function(c){var d=b(this).siblings(".task-description"),g=d.val();void 0!==g[0]&&(g=g.replace(/(\r\n|\n|\r)/gm," "),a.create_task(g),description_content=e.val()+"\n"+g,void 0===e.val()[0]&&(description_content=g),e.val(description_content),d.val("")); c.preventDefault()})},delete_event:function(a,c){b(a).click(function(a){var d=b(c).index();b(c).remove();var f=e.val().split("\n");f.splice(d,1);e.val(f.join("\n"));a.preventDefault()})},edit_event:function(a){b(a).click(function(a){a.preventDefault()})}});a.init()}b.fn.tasksplease=function(e){var a=this.data("tasksplease");if(a)return a;var f={sorteable:!0};e&&b.extend(f,e);return this.each(function(){a=new h(b(this),f);b(this).data("tasksplease",a)})}})(jQuery);

No commit comments for this range

Something went wrong with that request. Please try again.