Thread: [dradis-svn] SF.net SVN: dradis:[355] server/trunk/public/javascripts/interface.js
Collaboration and reporting tool for InfoSec teams.
Brought to you by:
etdsoft
From: <et...@us...> - 2008-09-28 17:42:49
|
Revision: 355 http://dradis.svn.sourceforge.net/dradis/?rev=355&view=rev Author: etdsoft Date: 2008-09-28 17:42:44 +0000 (Sun, 28 Sep 2008) Log Message: ----------- The ExtJS application, this is the very first draft, creates the viewport (layout) and the Tree and Notes panels. Added Paths: ----------- server/trunk/public/javascripts/interface.js Added: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js (rev 0) +++ server/trunk/public/javascripts/interface.js 2008-09-28 17:42:44 UTC (rev 355) @@ -0,0 +1,107 @@ +// ----------------------------------------- app config +Ext.BLANK_IMAGE_URL = '/images/default/s.gif'; +Ext.ns('dradis'); + +// ----------------------------------------- header: title + toolbar +//dradis.HeaderPanel = new Ext.Panel({ +dradisheader = new Ext.Panel({ + border: false, + layout:'anchor', + region:'north', + //cls: 'docs-header', + //height:60, + margins: '0 0 5 0', + autoHeight: true, + items: [ + { + xtype:'box', + el:'header', + border:false, + //anchor: 'none -25' + }, + new Ext.Toolbar( + { + border: false, + //autoHeight: true, + items: [ + { + text: 'logout', + handler: function(){ window.location = '/logout';}, + tooltip: {text:'End session'} + } + ] + }) + ] +}); + +//Ext.reg('dradisheader', dradis.HeaderPanel); + +// ----------------------------------------- tree + +dradis.NodesTree = Ext.extend(Ext.tree.TreePanel, { + width: 200, + autoScroll: true, + split: true, + useArrows:true, + autoScroll:true, + animate:true, + enableDD:true, + loader: new Ext.tree.TreeLoader({ + url: 'json/nodes', + requestMethod: 'GET' + }), + root: new Ext.tree.AsyncTreeNode({ + expanded: true, + }), + rootVisible: false, + listeners: { + click: function(n) { + Ext.Msg.alert('Navigation Tree Click', 'You clicked: "' + n.attributes.text + '"'); + } + } +}); + +Ext.reg('dradisnodes', dradis.NodesTree); + +// ----------------------------------------- notes + + + +Ext.onReady(function() { + Ext.QuickTips.init(); + + var vp = new Ext.Viewport({ + layout: 'border', + items: [ + dradisheader, + { // left-hand side, the tree + region: 'west', + collapsible: true, + //title: 'Navigation', + xtype: 'dradisnodes', + }, + { // center panel view + region: 'center', + xtype: 'tabpanel', + tabPosition: 'bottom', + items: [{ + title: 'Notes', + html: 'The first tab\'s content. Others may be added dynamically' + },{ + title: 'Properties' + }] + }, { + // console? do we need this? + region: 'south', + //title: 'Information', + //ollapsible: true, + //html: 'Information goes here', + //split: true, + //height: 100, + //minHeight: 100 + xtype: 'statusbar' + }] + }); + vp.doLayout(); + +}); Property changes on: server/trunk/public/javascripts/interface.js ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2008-10-03 16:16:31
|
Revision: 361 http://dradis.svn.sourceforge.net/dradis/?rev=361&view=rev Author: etdsoft Date: 2008-10-03 16:16:20 +0000 (Fri, 03 Oct 2008) Log Message: ----------- The new ViewPort has 3 main components: - header: that contains a title and a toolbar whose only button is 'logout' - west panel: The nodes tree that reflects the nodes hierarchy in the database - east panel: A tabbed widget with two tabs, one for the notes and one for in the properties of each node. The NodesBrowser is defined in a separate file 'public/javascripts/notesbrowser.js' Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2008-10-03 16:08:07 UTC (rev 360) +++ server/trunk/public/javascripts/interface.js 2008-10-03 16:16:20 UTC (rev 361) @@ -1,7 +1,7 @@ -// ----------------------------------------- app config + Ext.BLANK_IMAGE_URL = '/images/default/s.gif'; -Ext.ns('dradis'); - +//Ext.ns('dradis'); + // ----------------------------------------- header: title + toolbar //dradis.HeaderPanel = new Ext.Panel({ dradisheader = new Ext.Panel({ @@ -56,7 +56,10 @@ rootVisible: false, listeners: { click: function(n) { - Ext.Msg.alert('Navigation Tree Click', 'You clicked: "' + n.attributes.text + '"'); + notesbrowser.updateNotes(n.attributes.id); + if (dradistabs.getActiveTab() == null) { + dradistabs.setActiveTab(0); + } } } }); @@ -65,8 +68,27 @@ // ----------------------------------------- notes +var notesbrowser = new dradis.NotesBrowser(); +var dradistabs = new Ext.TabPanel({ + region: 'center', + tabPosition: 'bottom', + deferredRender: false, + items: [ + notesbrowser, + { contentEl: 'properties', title: 'Properties'} + ], +}); +// ----------------------------------------- status bar +var dradisstatus = new Ext.StatusBar({ + region: 'south', + defaultText: '' +}); +Ext.Ajax.on('beforerequest', function(){ dradisstatus.showBusy(); }); +Ext.Ajax.on('requestcomplete', function(){ dradisstatus.clearStatus({useDefaults:true}); }); + + Ext.onReady(function() { Ext.QuickTips.init(); @@ -80,28 +102,22 @@ //title: 'Navigation', xtype: 'dradisnodes', }, - { // center panel view - region: 'center', - xtype: 'tabpanel', - tabPosition: 'bottom', - items: [{ - title: 'Notes', - html: 'The first tab\'s content. Others may be added dynamically' - },{ - title: 'Properties' - }] - }, { + dradistabs, + dradisstatus + //{ // console? do we need this? - region: 'south', + //region: 'south', //title: 'Information', //ollapsible: true, //html: 'Information goes here', //split: true, //height: 100, //minHeight: 100 - xtype: 'statusbar' - }] + //xtype: 'statusbar' + //} + ] }); + store.load(); vp.doLayout(); }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2008-11-03 15:11:32
|
Revision: 370 http://dradis.svn.sourceforge.net/dradis/?rev=370&view=rev Author: etdsoft Date: 2008-11-03 15:11:26 +0000 (Mon, 03 Nov 2008) Log Message: ----------- Add event handlers for the nodes tree context menu. Get rid of the first store.load() which is not needed and just loaded the grid with invalid data Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2008-11-03 15:09:44 UTC (rev 369) +++ server/trunk/public/javascripts/interface.js 2008-11-03 15:11:26 UTC (rev 370) @@ -37,13 +37,46 @@ expanded: true, }), rootVisible: false, + contextMenu: new Ext.menu.Menu({ + items: [ + { id: 'add-node', text: 'Add child', iconCls: 'add' }, + { id: 'delete-node', text: 'Delete Node', iconCls: 'del' } + ], + listeners: { + itemclick: function(item) { + switch (item.id) { + case 'add-node': + var root = item.parentMenu.contextNode; + var node = root.appendChild(new Ext.tree.TreeNode({ text:'child node' })); + node.select(); + break; + case 'delete-node': + var n = item.parentMenu.contextNode; + if (n.parentNode) { + n.remove(); + } + break; + } + } + } + }), listeners: { click: function(n) { notesbrowser.updateNotes(n.attributes.id); if (dradistabs.getActiveTab() == null) { dradistabs.setActiveTab(0); } + }, + contextmenu: function(node, e) { + // Register the context node with the menu so that a Menu Item's handler function can access + // it via its parentMenu property. + node.select(); + node.expand(); + var c = node.getOwnerTree().contextMenu; + c.contextNode = node; + c.showAt(e.getXY()); } + } }); @@ -100,7 +133,5 @@ //} ] }); - store.load(); vp.doLayout(); - }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2009-06-29 20:16:33
|
Revision: 1217 http://dradis.svn.sourceforge.net/dradis/?rev=1217&view=rev Author: etdsoft Date: 2009-06-29 20:16:31 +0000 (Mon, 29 Jun 2009) Log Message: ----------- Moving around code, grouping common chunks together: - The HeaderPanel object was never used (although this may be required in the future). - Group together all the widget instantiations and also group the event handlers. Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2009-06-29 18:37:56 UTC (rev 1216) +++ server/trunk/public/javascripts/interface.js 2009-06-29 20:16:31 UTC (rev 1217) @@ -2,28 +2,7 @@ Ext.BLANK_IMAGE_URL = '/images/default/s.gif'; Ext.state.Manager.setProvider(new Ext.state.CookieProvider); -// ----------------------------------------- header: title + toolbar -dradis.HeaderPanel = function(config){ - Ext.apply(this, { - border: false, - layout:'anchor', - region:'north', - margins: '0 0 5 0', - autoHeight: true, - title: dradis.version, - tbar: [ - {xtype: 'tbfill' }, - {text: 'logout', handler: function(){ window.location = '/logout'; }, tooltip: 'End session'} - ] - }); - - dradis.HeaderPanel.superclass.constructor.apply(this, arguments); -}; - -Ext.extend( dradis.HeaderPanel, Ext.Panel, {} ); -Ext.reg('headerpanel', dradis.HeaderPanel); - - +// ------------------------------------------------------- custom ExtJS widgets var nodestree = new dradis.NodesTree(); var notesbrowser = new dradis.NotesBrowser(); var importer = new dradis.importer.Panel(); @@ -41,6 +20,19 @@ }); +var dradisstatus = new Ext.StatusBar({ + region: 'south', + defaultText: '' +}); + + +/* + * ------------------------------------------------------- custom ExtJS widgets + * Events thrown by the different widgets are handleded in this object and + * notifications are passed to other widgets of the interface were appropriate. + * ---------------------------------------------------------------------------- + */ + nodestree.on('nodeclick', function(node_id){ notesbrowser.updateNotes(node_id); importer.updateSources(node_id); @@ -55,16 +47,14 @@ dradistabs.activate(notesbrowser); }); -// ----------------------------------------- status bar -var dradisstatus = new Ext.StatusBar({ - region: 'south', - defaultText: '' -}); Ext.Ajax.on('beforerequest', function(){ dradisstatus.showBusy(); }); Ext.Ajax.on('requestcomplete', function(){ dradisstatus.clearStatus({useDefaults:true}); }); - +/* + * onReady gets called when the page is rendered, all the files are loaded and + * we are ready to rock! + */ Ext.onReady(function() { Ext.QuickTips.init(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2009-07-02 09:51:53
|
Revision: 1226 http://dradis.svn.sourceforge.net/dradis/?rev=1226&view=rev Author: etdsoft Date: 2009-07-02 09:51:13 +0000 (Thu, 02 Jul 2009) Log Message: ----------- If the menu items are standard and not tbsplit, when you click on them the menu is displayed, otherwise you have to click in the arrow which breaks the "menu" effect. Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2009-07-01 22:08:24 UTC (rev 1225) +++ server/trunk/public/javascripts/interface.js 2009-07-02 09:51:13 UTC (rev 1226) @@ -71,7 +71,6 @@ bbar: [ { text: 'file', - xtype: 'tbsplit', menu: new Ext.menu.Menu({ items:[ { @@ -98,7 +97,6 @@ }, { text: 'export', - xtype: 'tbsplit', tooltip: 'export dradis contents to external sources', iconCls: 'export', menu: plugins.exportPluginsMenu() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2009-07-03 19:44:18
|
Revision: 1252 http://dradis.svn.sourceforge.net/dradis/?rev=1252&view=rev Author: etdsoft Date: 2009-07-03 19:44:18 +0000 (Fri, 03 Jul 2009) Log Message: ----------- Get rid of the +File+ menu for the time being because we only have one item... Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2009-07-03 19:40:05 UTC (rev 1251) +++ server/trunk/public/javascripts/interface.js 2009-07-03 19:44:18 UTC (rev 1252) @@ -83,21 +83,14 @@ border: false, margins: '0 0 5 0', bbar: [ - { - text: 'file', - menu: new Ext.menu.Menu({ - items:[ - { - text: 'import from file...', - iconCls:'icon-form-magnify', - handler: function() { - var uploaders = new dradis.plugins.UploadFormWindow(); - uploaders.show(); - uploaders.center(); - } - } - ] - }) + { + text: 'import from file...', + iconCls:'icon-form-magnify', + handler: function() { + var uploaders = new dradis.plugins.UploadFormWindow(); + uploaders.show(); + uploaders.center(); + } }, { text: 'export', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2009-07-05 14:59:28
|
Revision: 1263 http://dradis.svn.sourceforge.net/dradis/?rev=1263&view=rev Author: etdsoft Date: 2009-07-05 14:59:22 +0000 (Sun, 05 Jul 2009) Log Message: ----------- - The uploaders object is reusable, so we create it with the rest of the widgets and then show() and hide() it. - Detect a successful file upload and refresh the nodestree to reveal the recently added items (if any) Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2009-07-05 14:55:42 UTC (rev 1262) +++ server/trunk/public/javascripts/interface.js 2009-07-05 14:59:22 UTC (rev 1263) @@ -31,7 +31,7 @@ }); var plugins = new dradis.plugins.PluginManager(); -var uploadPluginsPanel = new dradis.plugins.UploadFormPanel({manager: plugins}); +var uploaders = new dradis.plugins.UploadFormWindow(); /* * ------------------------------------------------------- custom ExtJS widgets @@ -44,6 +44,7 @@ notesbrowser.updateNotes(node_id); importer.updateSources(node_id); attachments.updateAttachments(node_id); + dradistabs.enable(); if (dradistabs.getActiveTab() === null) { dradistabs.setActiveTab(0); } @@ -54,6 +55,11 @@ dradistabs.activate(notesbrowser); }); +uploaders.on('uploadsuccess', function(){ + dradistabs.disable(); + nodestree.refresh(); +}); + Ext.Ajax.on('beforerequest', function(){ dradisstatus.showBusy(); }); Ext.Ajax.on('requestcomplete', function(){ dradisstatus.clearStatus({useDefaults:true}); }); @@ -87,7 +93,6 @@ text: 'import from file...', iconCls:'icon-form-magnify', handler: function() { - var uploaders = new dradis.plugins.UploadFormWindow(); uploaders.show(); uploaders.center(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2009-08-17 16:29:09
|
Revision: 1423 http://dradis.svn.sourceforge.net/dradis/?rev=1423&view=rev Author: etdsoft Date: 2009-08-17 16:29:00 +0000 (Mon, 17 Aug 2009) Log Message: ----------- Connect the +notesdrop+ event from the tree with the +moveNodeToNote+ method of the NotesBrowser. Refresh when all the drops have benn processed Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2009-08-17 16:27:41 UTC (rev 1422) +++ server/trunk/public/javascripts/interface.js 2009-08-17 16:29:00 UTC (rev 1423) @@ -68,6 +68,17 @@ } }); +nodestree.on('notesdrop', function(drop_ev) { + var notes = drop_ev.data.selections; + var node_id = drop_ev.target.id; + + for(var i = 0, len = notes.length; i < len; i++){ + notesbrowser.moveNoteToNode(notes[i].id, node_id); + } + + setTimeout( 'notesbrowser.refresh();', 3000); +}); + importer.on('importrecord',function(record){ notesbrowser.addNote(record.data.description ); dradistabs.activate(notesbrowser); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2009-09-03 22:20:41
|
Revision: 1441 http://dradis.svn.sourceforge.net/dradis/?rev=1441&view=rev Author: etdsoft Date: 2009-09-03 22:20:21 +0000 (Thu, 03 Sep 2009) Log Message: ----------- On +uploadfailure+ let the user know, present a message with the error string and instructions on how to get help Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2009-09-03 22:19:21 UTC (rev 1440) +++ server/trunk/public/javascripts/interface.js 2009-09-03 22:20:21 UTC (rev 1441) @@ -97,7 +97,26 @@ nodestree.refresh(); }); +uploaders.on('uploadfailure', function(response){ + // FIXME: Convert this into an Ext Template + Ext.Msg.show({ + title: 'There was an error processing the upload', + msg: '<p>We could not process the upload.</p><p>Error message was:</p>' + + '<textarea cols="80">' + Ext.util.Format.htmlEncode( response.error ) + '</textarea>' + + '<p>The stack trace was:</p>' + + '<textarea cols="80" rows="10">' + Ext.util.Format.htmlEncode( response.backtrace.join("\n") ) + '</textarea>' + + '<p>What to do now:</p>' + + '<ul>' + + '<li>- Go through the plugin\'s documentation.</li>' + + '<li>- Ask in the <a href="http://dradisframework.org/community/" target="_blank">community forums</a> or the <a href="http://dradisframework.org/mailing_lists.html" target="_blank">mailing lists</a></li>' + + '<li>- If all else fails, please consider submitting a <a href="http://sourceforge.net/tracker/?func=add&group_id=209736&atid=1010917" target="_blank">bug report</a>.</li>' + + '</ul>', + buttons: Ext.Msg.OK, + icon: Ext.Msg.WARNING + }); +}); + // --- all-purpose general Ajax handlers to update the Status bar message Ext.Ajax.on('beforerequest', function(){ dradisstatus.showBusy(); }); Ext.Ajax.on('requestcomplete', function(){ dradisstatus.clearStatus({useDefaults:true}); }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sie...@us...> - 2010-01-19 22:37:58
|
Revision: 1820 http://dradis.svn.sourceforge.net/dradis/?rev=1820&view=rev Author: siebertlubbe Date: 2010-01-19 22:37:47 +0000 (Tue, 19 Jan 2010) Log Message: ----------- Adding a click event to show the feeds window Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2010-01-19 19:35:55 UTC (rev 1819) +++ server/trunk/public/javascripts/interface.js 2010-01-19 22:37:47 UTC (rev 1820) @@ -54,7 +54,12 @@ }, { id: 'rss-icon', - iconCls: 'rss-off' + iconCls: 'rss-off', + listeners: { + click:function(){ + alert("RSS feeds windo to go here!") + } + } } ] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2010-01-31 20:37:47
|
Revision: 1846 http://dradis.svn.sourceforge.net/dradis/?rev=1846&view=rev Author: etdsoft Date: 2010-01-31 20:37:39 +0000 (Sun, 31 Jan 2010) Log Message: ----------- The Feeds panel should not be part of the main interface, it has been moved to it's own window that can be invoked through the RSS icon in the bottom right corner of the GUI. Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2010-01-31 20:34:31 UTC (rev 1845) +++ server/trunk/public/javascripts/interface.js 2010-01-31 20:37:39 UTC (rev 1846) @@ -187,8 +187,7 @@ border: false, welcome:{}, bbar: dradisstatus - }), - feeds + }) //{ // console? do we need this? //region: 'south', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2011-04-04 14:19:15
|
Revision: 2494 http://dradis.svn.sourceforge.net/dradis/?rev=2494&view=rev Author: etdsoft Date: 2011-04-04 14:19:05 +0000 (Mon, 04 Apr 2011) Log Message: ----------- >From now on, every Ajax call will include the CSRF token. There is no need to track the @authenticity_token@ param any more. Next step will be to drop @dradis.token@ and patch all the calls where @authentiticy_token@ is used. This should fix the weird Ajax problems (http auth box) that some users have experienced. Further references: * http://weblog.rubyonrails.org/2011/2/8/csrf-protection-bypass-in-ruby-on-rails#respond * https://gist.github.com/862142 Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2011-04-04 10:06:58 UTC (rev 2493) +++ server/trunk/public/javascripts/interface.js 2011-04-04 14:19:05 UTC (rev 2494) @@ -251,6 +251,7 @@ }); + Ext.Ajax.defaultHeaders = { 'X-CSRF-Token': Ext.select('meta[name=csrf-token]').item(0).getAttribute('content') }; Ext.TaskMgr.start({ run: checkrevision, interval: 10000 }); plugins.refresh(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2011-04-12 18:25:03
|
Revision: 2512 http://dradis.svn.sourceforge.net/dradis/?rev=2512&view=rev Author: etdsoft Date: 2011-04-12 18:24:57 +0000 (Tue, 12 Apr 2011) Log Message: ----------- Because attachment uploads don't use Ajax but a hidden @iframe@ we need to make sure we are sending the CSRF token in that instance too. Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2011-04-12 12:24:03 UTC (rev 2511) +++ server/trunk/public/javascripts/interface.js 2011-04-12 18:24:57 UTC (rev 2512) @@ -266,7 +266,10 @@ }); - Ext.Ajax.defaultHeaders = { 'X-CSRF-Token': Ext.select('meta[name=csrf-token]').item(0).getAttribute('content') }; + var csrf_token = Ext.select('meta[name=csrf-token]').item(0).getAttribute('content'); + Ext.Ajax.defaultHeaders = { 'X-CSRF-Token': csrf_token }; + attachments.fields.uploader.uploader.baseParams['authenticity_token'] = csrf_token; + Ext.TaskMgr.start({ run: checkrevision, interval: 10000 }); plugins.refresh(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2008-11-08 18:57:28
|
Revision: 374 http://dradis.svn.sourceforge.net/dradis/?rev=374&view=rev Author: etdsoft Date: 2008-11-08 18:57:24 +0000 (Sat, 08 Nov 2008) Log Message: ----------- Move the code of the NodesTree to a separate file Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2008-11-03 16:14:40 UTC (rev 373) +++ server/trunk/public/javascripts/interface.js 2008-11-08 18:57:24 UTC (rev 374) @@ -19,72 +19,10 @@ Ext.extend( dradis.HeaderPanel, Ext.Panel, {} ); Ext.reg('headerpanel', dradis.HeaderPanel); -// ----------------------------------------- tree -dradis.NodesTree = Ext.extend(Ext.tree.TreePanel, { - width: 200, - autoScroll: true, - split: true, - useArrows:true, - autoScroll:true, - animate:true, - enableDD:true, - loader: new Ext.tree.TreeLoader({ - url: 'json/nodes', - requestMethod: 'GET' - }), - root: new Ext.tree.AsyncTreeNode({ - expanded: true, - }), - rootVisible: false, - contextMenu: new Ext.menu.Menu({ - items: [ - { id: 'add-node', text: 'Add child', iconCls: 'add' }, - { id: 'delete-node', text: 'Delete Node', iconCls: 'del' } - ], - listeners: { - itemclick: function(item) { - switch (item.id) { - case 'add-node': - var root = item.parentMenu.contextNode; - var node = root.appendChild(new Ext.tree.TreeNode({ text:'child node' })); - node.select(); - break; - case 'delete-node': - var n = item.parentMenu.contextNode; - if (n.parentNode) { - n.remove(); - } - break; - } - } - } - }), - listeners: { - click: function(n) { - notesbrowser.updateNotes(n.attributes.id); - if (dradistabs.getActiveTab() == null) { - dradistabs.setActiveTab(0); - } - }, - contextmenu: function(node, e) { - // Register the context node with the menu so that a Menu Item's handler function can access - // it via its parentMenu property. - node.select(); - node.expand(); - var c = node.getOwnerTree().contextMenu; - c.contextNode = node; - c.showAt(e.getXY()); - } - - } -}); - -Ext.reg('dradisnodes', dradis.NodesTree); - -// ----------------------------------------- notes - +var nodestree = new dradis.NodesTree(); var notesbrowser = new dradis.NotesBrowser(); + var dradistabs = new Ext.TabPanel({ region: 'center', tabPosition: 'bottom', @@ -116,7 +54,7 @@ region: 'west', collapsible: true, //title: 'Navigation', - xtype: 'dradisnodes', + xtype: 'nodestree', }, dradistabs, dradisstatus This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2008-12-18 22:38:07
|
Revision: 504 http://dradis.svn.sourceforge.net/dradis/?rev=504&view=rev Author: etdsoft Date: 2008-12-18 22:33:13 +0000 (Thu, 18 Dec 2008) Log Message: ----------- Push the +logout+ button to the right Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2008-12-14 22:38:04 UTC (rev 503) +++ server/trunk/public/javascripts/interface.js 2008-12-18 22:33:13 UTC (rev 504) @@ -10,7 +10,10 @@ margins: '0 0 5 0', autoHeight: true, title: 'dradis v2.0', - tbar: [ {text: 'logout', handler: function(){ window.location = '/logout'; }, tooltip: 'End session'} ], + tbar: [ + {xtype: 'tbfill' }, + {text: 'logout', handler: function(){ window.location = '/logout'; }, tooltip: 'End session'} + ], }); dradis.HeaderPanel.superclass.constructor.apply(this, arguments); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2008-12-19 14:18:55
|
Revision: 508 http://dradis.svn.sourceforge.net/dradis/?rev=508&view=rev Author: etdsoft Date: 2008-12-19 14:18:50 +0000 (Fri, 19 Dec 2008) Log Message: ----------- Create and Ext task that will poll the server to check if there is a new revision available. This fires every 10 seconds. Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2008-12-19 14:18:01 UTC (rev 507) +++ server/trunk/public/javascripts/interface.js 2008-12-19 14:18:50 UTC (rev 508) @@ -75,4 +75,5 @@ ] }); vp.doLayout(); + Ext.TaskMgr.start({ run: checkrevision, interval: 10000 }); }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2009-01-12 23:26:05
|
Revision: 525 http://dradis.svn.sourceforge.net/dradis/?rev=525&view=rev Author: etdsoft Date: 2009-01-12 23:26:02 +0000 (Mon, 12 Jan 2009) Log Message: ----------- Fix the header to avoid the minimum Panel height in IE. Now a new panel is created, no title but with the content of the x-panel-header class, so it seems like a title. The toolbar is not needed, and the logout is now a link instead a button. Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2009-01-12 19:39:43 UTC (rev 524) +++ server/trunk/public/javascripts/interface.js 2009-01-12 23:26:02 UTC (rev 525) @@ -34,6 +34,7 @@ notesbrowser, { contentEl: 'properties', title: 'Properties'} ] + }); // ----------------------------------------- status bar @@ -52,7 +53,14 @@ var vp = new Ext.Viewport({ layout: 'border', items: [ - { xtype: 'headerpanel' }, + { + region: 'north', + html: '<h1 class="x-panel-header" style="text-align: right;">dradis v2.0 (<a href="/logout">logout</a>)</h1>', + autoHeight: true, + border: false, + margins: '0 0 5 0', + }, + //{ xtype: 'headerpanel' }, { // left-hand side, the tree region: 'west', collapsible: true, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2009-01-14 16:32:39
|
Revision: 535 http://dradis.svn.sourceforge.net/dradis/?rev=535&view=rev Author: etdsoft Date: 2009-01-14 16:32:29 +0000 (Wed, 14 Jan 2009) Log Message: ----------- Fix one of this syntax errors that prevents IE7 from working. Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2009-01-14 16:19:34 UTC (rev 534) +++ server/trunk/public/javascripts/interface.js 2009-01-14 16:32:29 UTC (rev 535) @@ -58,7 +58,7 @@ html: '<h1 class="x-panel-header" style="text-align: right;">dradis v2.0 (<a href="/logout">logout</a>)</h1>', autoHeight: true, border: false, - margins: '0 0 5 0', + margins: '0 0 5 0' }, //{ xtype: 'headerpanel' }, { // left-hand side, the tree This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2009-03-09 15:57:35
|
Revision: 691 http://dradis.svn.sourceforge.net/dradis/?rev=691&view=rev Author: etdsoft Date: 2009-03-09 15:57:34 +0000 (Mon, 09 Mar 2009) Log Message: ----------- Add the NotesImporter as the second tab. Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2009-03-09 15:55:53 UTC (rev 690) +++ server/trunk/public/javascripts/interface.js 2009-03-09 15:57:34 UTC (rev 691) @@ -25,6 +25,7 @@ var nodestree = new dradis.NodesTree(); var notesbrowser = new dradis.NotesBrowser(); +var importer = new dradis.NotesImporter(); var dradistabs = new Ext.TabPanel({ region: 'center', @@ -33,7 +34,7 @@ items: [ notesbrowser, //{ contentEl: 'properties', title: 'Properties'}, - { contentEl: 'import', title: 'Import from...'} + importer ] }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2009-03-16 16:38:45
|
Revision: 774 http://dradis.svn.sourceforge.net/dradis/?rev=774&view=rev Author: etdsoft Date: 2009-03-16 16:38:28 +0000 (Mon, 16 Mar 2009) Log Message: ----------- Add an event handler for the +importrecord+ event thrown by the instance of dradis.importer.Panel. Ideally all communication in the JavaScript layer should be similar to this: components signaling event and a "controller" tying events with each other. We need to clean up lots of the code for the future. Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2009-03-16 16:35:04 UTC (rev 773) +++ server/trunk/public/javascripts/interface.js 2009-03-16 16:38:28 UTC (rev 774) @@ -39,6 +39,10 @@ }); +importer.on('importrecord',function(record){ + notesbrowser.addNote(record.data.description ); +}); + // ----------------------------------------- status bar var dradisstatus = new Ext.StatusBar({ region: 'south', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2009-03-16 16:58:28
|
Revision: 775 http://dradis.svn.sourceforge.net/dradis/?rev=775&view=rev Author: etdsoft Date: 2009-03-16 16:58:17 +0000 (Mon, 16 Mar 2009) Log Message: ----------- Activate the notes tab after importing the note so we have a chance of editing it Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2009-03-16 16:38:28 UTC (rev 774) +++ server/trunk/public/javascripts/interface.js 2009-03-16 16:58:17 UTC (rev 775) @@ -41,6 +41,7 @@ importer.on('importrecord',function(record){ notesbrowser.addNote(record.data.description ); + dradistabs.activate(notesbrowser); }); // ----------------------------------------- status bar This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sie...@us...> - 2009-03-16 22:33:26
|
Revision: 777 http://dradis.svn.sourceforge.net/dradis/?rev=777&view=rev Author: siebertlubbe Date: 2009-03-16 22:32:54 +0000 (Mon, 16 Mar 2009) Log Message: ----------- Create a tab where the attachments will live (will do the meat next) Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2009-03-16 22:27:24 UTC (rev 776) +++ server/trunk/public/javascripts/interface.js 2009-03-16 22:32:54 UTC (rev 777) @@ -34,7 +34,8 @@ items: [ notesbrowser, //{ contentEl: 'properties', title: 'Properties'}, - importer + importer, + { contentEl: 'attachments', title: 'Attachments'} ] }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2009-03-25 23:51:47
|
Revision: 810 http://dradis.svn.sourceforge.net/dradis/?rev=810&view=rev Author: etdsoft Date: 2009-03-25 23:51:37 +0000 (Wed, 25 Mar 2009) Log Message: ----------- Make the tree and the grid share a sliding border (splitter) Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2009-03-23 21:43:51 UTC (rev 809) +++ server/trunk/public/javascripts/interface.js 2009-03-25 23:51:37 UTC (rev 810) @@ -73,6 +73,7 @@ region: 'west', collapsible: true, //title: 'Navigation', + split:true, xtype: 'nodestree' }, dradistabs, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2009-04-17 20:44:14
|
Revision: 1004 http://dradis.svn.sourceforge.net/dradis/?rev=1004&view=rev Author: etdsoft Date: 2009-04-17 20:44:10 +0000 (Fri, 17 Apr 2009) Log Message: ----------- Hopefully the last place where there is still a 2.0 Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2009-04-17 19:11:16 UTC (rev 1003) +++ server/trunk/public/javascripts/interface.js 2009-04-17 20:44:10 UTC (rev 1004) @@ -63,7 +63,7 @@ items: [ { region: 'north', - html: '<h1 class="x-panel-header" style="text-align: right;">dradis v2.0 (<a href="/logout">logout</a>)</h1>', + html: '<h1 class="x-panel-header" style="text-align: right;">dradis v2.1.1 (<a href="/logout">logout</a>)</h1>', autoHeight: true, border: false, margins: '0 0 5 0' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <et...@us...> - 2009-06-29 18:38:01
|
Revision: 1216 http://dradis.svn.sourceforge.net/dradis/?rev=1216&view=rev Author: etdsoft Date: 2009-06-29 18:37:56 +0000 (Mon, 29 Jun 2009) Log Message: ----------- We can still maintain the header trick and add a menu bar. Instead of using the tbar property that would create a menu bar above the HTML content, we use the bbar property that creates one below. As a proof of concept the +Import from file...+ menu opens up a new window, centered in the screen that will contain the import from file form at some point. Modified Paths: -------------- server/trunk/public/javascripts/interface.js Modified: server/trunk/public/javascripts/interface.js =================================================================== --- server/trunk/public/javascripts/interface.js 2009-06-29 18:34:02 UTC (rev 1215) +++ server/trunk/public/javascripts/interface.js 2009-06-29 18:37:56 UTC (rev 1216) @@ -76,7 +76,29 @@ html: '<h1 class="x-panel-header" style="text-align: right;">'+dradis.version+' (<a href="/logout">logout</a>)</h1>', autoHeight: true, border: false, - margins: '0 0 5 0' + margins: '0 0 5 0', + bbar: [ + { + text: 'File', + menu: new Ext.menu.Menu({ + items:[ + { + text: 'import from file...', + iconCls:'icon-form-magnify', + handler: function() { + var win = new Ext.Window({ + title: 'Upload from file', + width: 400, + height: 300 + }); + win.show(); + win.center(); + } + } + ] + }) + } + ] }, nodestree, dradistabs, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |