Upgrade to ExtJS 3.0.0 - Released 07/06/2009
[extjs.git] / air / samples / tasks / js / data.js
diff --git a/air/samples/tasks/js/data.js b/air/samples/tasks/js/data.js
deleted file mode 100644 (file)
index d527c31..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*\r
- * Ext JS Library 0.30\r
- * Copyright(c) 2006-2009, Ext JS, LLC.\r
- * licensing@extjs.com\r
- * \r
- * http://extjs.com/license\r
- */\r
-\r
-// Unique task ids, if the time isn't unique enough, the addition \r
-// of random chars should be\r
-Ext.uniqueId = function(){\r
-       var t = String(new Date().getTime()).substr(4);\r
-       var s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r
-       for(var i = 0; i < 4; i++){\r
-               t += s.charAt(Math.floor(Math.random()*26));\r
-       }\r
-       return t;\r
-}\r
-\r
-// Define the Task data type\r
-tx.data.Task = Ext.data.Record.create([\r
-    {name: 'taskId', type:'string'},\r
-    {name: 'listId', type:'string'},\r
-    {name: 'title', type:'string'},\r
-    {name: 'description', type:'string'},\r
-    {name: 'dueDate', type:'date', dateFormat: Ext.sql.Proxy.DATE_FORMAT, defaultValue: ''},\r
-    {name: 'completed', type:'boolean'},\r
-    {name: 'completedDate', type:'date', dateFormat: Ext.sql.Proxy.DATE_FORMAT, defaultValue: ''},\r
-    {name: 'reminder', type:'date', dateFormat: Ext.sql.Proxy.DATE_FORMAT, defaultValue: ''}\r
-]);\r
-\r
-// Define the List data type\r
-tx.data.List = Ext.data.Record.create([\r
-    {name: 'listId', type:'string'},\r
-    {name: 'parentId', type:'string'},\r
-    {name: 'listName', type:'string'},\r
-    {name: 'isFolder', type:'boolean'}\r
-]);\r
-\r
-\r
-// Grab a SQL connection instance\r
-tx.data.conn = Ext.sql.Connection.getInstance();\r
-\r
-tx.data.tasks = new tx.data.TaskStore();\r
-tx.data.lists = new tx.data.ListStore();\r
-\r
-\r
-tx.data.getDefaultReminder = function(task){\r
-       var s = task.data.dueDate ? task.data.dueDate.clearTime(true) : new Date().clearTime();\r
-       s = s.add('mi', Ext.state.Manager.get('defaultReminder'));\r
-       return s;\r
-};\r
-\r
-\r
-tx.data.getActiveListId = function(){\r
-    var id = tx.data.tasks.activeList;\r
-    if(!id){\r
-        var first = tx.data.lists.getAt(0);\r
-        if(first){\r
-            id = first.id;\r
-        }else{\r
-            id = tx.data.lists.newList().id;\r
-        }\r
-    }\r
-    return id;\r
-};\r
-\r