X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775:/docs/source/columns.html?ds=inline diff --git a/docs/source/columns.html b/docs/source/columns.html deleted file mode 100644 index fc1e004f..00000000 --- a/docs/source/columns.html +++ /dev/null @@ -1,168 +0,0 @@ - - - The source code - - - - -
// Grid column plugin that does the complete/active button in the left-most column
-CompleteColumn = function(){
-    var grid;
-
-    function getRecord(t){
-        var index = grid.getView().findRowIndex(t);
-        return grid.store.getAt(index);
-    }
-
-    function onMouseDown(e, t){
-        if(Ext.fly(t).hasClass('task-check')){
-            e.stopEvent();
-            var record = getRecord(t);
-            record.set('completed', !record.data.completed);
-            grid.store.applyFilter();
-        }
-    }
-
-    function onMouseOver(e, t){
-        if(Ext.fly(t).hasClass('task-check')){
-            Ext.fly(t.parentNode).addClass('task-check-over');
-        }
-    }
-
-    function onMouseOut(e, t){
-        if(Ext.fly(t).hasClass('task-check')){
-            Ext.fly(t.parentNode).removeClass('task-check-over');
-        }
-    }
-
-    Ext.apply(this, {
-        width: 22,
-        header: '
', - fixed: true, - menuDisabled: true, - id: 'task-col', - renderer: function(){ - return '
'; - }, - init : function(xg){ - grid = xg; - grid.on('render', function(){ - var view = grid.getView(); - view.mainBody.on('mousedown', onMouseDown); - view.mainBody.on('mouseover', onMouseOver); - view.mainBody.on('mouseout', onMouseOut); - }); - } - }); -}; - - -ReminderColumn = function(){ - var grid, menu, record; - - function getRecord(t){ - var index = grid.getView().findRowIndex(t); - return grid.store.getAt(index); - } - - function onMenuCheck(item){ - if(item.reminder === false){ - record.set('reminder', ''); - }else{ - var s = record.data.dueDate ? record.data.dueDate.clearTime(true) : new Date().clearTime(); - s = s.add('mi', Ext.state.Manager.get('defaultReminder')); - s = s.add('mi', item.reminder*-1); - record.set('reminder', s); - } - } - - function getMenu(){ - if(!menu){ - menu = new Ext.menu.Menu({ - plain: true, - items: [{ - text: 'No Reminder', - reminder: false, - handler: onMenuCheck - },'-',{ - text: 'On the Due Date', - reminder: 0, - handler: onMenuCheck - },'-',{ - text: '1 day before', - reminder: 24*60, - handler: onMenuCheck - },{ - text: '2 days before', - reminder: 48*60, - handler: onMenuCheck - },{ - text: '3 days before', - reminder: 72*60, - handler: onMenuCheck - },{ - text: '1 week before', - reminder: 7*24*60, - handler: onMenuCheck - },{ - text: '2 weeks before', - reminder: 14*24*60, - handler: onMenuCheck - },'-',{ - text: 'Set Default Time...', - handler: function(){ - Ext.air.NativeWindowManager.getPrefWindow(); - } - }] - }); - } - return menu; - } - - function onMouseDown(e, t){ - if(Ext.fly(t).hasClass('reminder')){ - e.stopEvent(); - record = getRecord(t); - if (!record.data.completed) { - var rmenu = getMenu(); - rmenu.show(t, 'tr-br?'); - } - } - } - - function onMouseOver(e, t){ - if(Ext.fly(t).hasClass('reminder')){ - Ext.fly(t.parentNode).addClass('reminder-over'); - } - } - - function onMouseOut(e, t){ - if(Ext.fly(t).hasClass('reminder')){ - Ext.fly(t.parentNode).removeClass('reminder-over'); - } - } - - Ext.apply(this, { - width: 26, - header: '
', - fixed: true, - id: 'reminder-col', - menuDisabled: true, - dataIndex:'reminder', - renderer: function(v){ - return '
'; - }, - init : function(xg){ - grid = xg; - grid.on('render', function(){ - var view = grid.getView(); - view.mainBody.on('contextmenu', onMouseDown); - view.mainBody.on('mousedown', onMouseDown); - view.mainBody.on('mouseover', onMouseOver); - view.mainBody.on('mouseout', onMouseOut); - }); - } - }); -};
- - \ No newline at end of file