Author: bricks
Date: 2017-01-13 14:48:03 +0100 (Fri, 13 Jan 2017)
New Revision: 27206

Modified:
   trunk/gsa/src/html/classic/ng/src/web/tasks/tasks.js
   trunk/gsa/src/html/classic/ng/src/web/toolbar.js
Log:
* src/html/classic/ng/src/web/tasks/tasks.js,
src/html/classic/ng/src/web/toolbar.js: Also use flexbox layout for the
toolbar.

Modified: trunk/gsa/src/html/classic/ng/src/web/tasks/tasks.js
===================================================================
--- trunk/gsa/src/html/classic/ng/src/web/tasks/tasks.js        2017-01-13 
13:48:01 UTC (rev 27205)
+++ trunk/gsa/src/html/classic/ng/src/web/tasks/tasks.js        2017-01-13 
13:48:03 UTC (rev 27206)
@@ -177,33 +177,36 @@
     return (
       <div>
         <Toolbar>
-          <HelpIcon page="tasks"/>
-          {caps.mayOp('run_wizard') &&
-            <IconMenu img="wizard.svg" title={_('Wizard')}
-              onClick={() => this.task_wizard.show()}>
-              <MenuEntry title={_('Task Wizard')}
-                onClick={() => this.task_wizard.show()}/>
-              <MenuEntry title={_('Advanced Task Wizard')}
-                onClick={() => this.advanced_task_wizard.show()}/>
-              <MenuEntry title={_('Modify Task Wizard')}
-                onClick={ () => this.modify_task_wizard.show()}/>
-            </IconMenu>
-          }
-          {caps.mayCreate('task') &&
-            <Icon img="new.svg" title={_('New Task')}
-              onClick={() => { this.create_dialog.show(); }}/>
-          }
-          {caps.mayOp('run_wizard') &&
-            <div>
-              <TaskWizard ref={ref => this.task_wizard = ref}
-                onSave={this.reload}
-                onNewClick={() => this.create_dialog.show()}/>
-              <AdvancedTaskWizard ref={ref => this.advanced_task_wizard = ref}
-                onSave={this.reload}/>
-              <ModifyTaskWizard ref={ref => this.modify_task_wizard = ref}
-                onSave={this.reload}/>
-            </div>
-          }
+          <Layout flex>
+            <HelpIcon page="tasks"/>
+            {caps.mayOp('run_wizard') &&
+              <IconMenu img="wizard.svg" size="small" title={_('Wizard')}
+                onClick={() => this.task_wizard.show()}>
+                <MenuEntry title={_('Task Wizard')}
+                  onClick={() => this.task_wizard.show()}/>
+                <MenuEntry title={_('Advanced Task Wizard')}
+                  onClick={() => this.advanced_task_wizard.show()}/>
+                <MenuEntry title={_('Modify Task Wizard')}
+                  onClick={ () => this.modify_task_wizard.show()}/>
+              </IconMenu>
+            }
+            {caps.mayCreate('task') &&
+              <Icon img="new.svg" title={_('New Task')}
+                onClick={() => { this.create_dialog.show(); }}/>
+            }
+            {caps.mayOp('run_wizard') &&
+              <div>
+                <TaskWizard ref={ref => this.task_wizard = ref}
+                  onSave={this.reload}
+                  onNewClick={() => this.create_dialog.show()}/>
+                <AdvancedTaskWizard ref={ref => this.advanced_task_wizard = 
ref}
+                  onSave={this.reload}/>
+                <ModifyTaskWizard ref={ref => this.modify_task_wizard = ref}
+                  onSave={this.reload}/>
+              </div>
+            }
+          </Layout>
+
           <TaskDialog ref={ref => this.create_dialog = ref}
             title={_('Create new Task')} onClose={this.reload}
             onSave={this.reload}/>

Modified: trunk/gsa/src/html/classic/ng/src/web/toolbar.js
===================================================================
--- trunk/gsa/src/html/classic/ng/src/web/toolbar.js    2017-01-13 13:48:01 UTC 
(rev 27205)
+++ trunk/gsa/src/html/classic/ng/src/web/toolbar.js    2017-01-13 13:48:03 UTC 
(rev 27206)
@@ -4,7 +4,7 @@
  * Björn Ricks <bjoern.ri...@greenbone.net>
  *
  * Copyright:
- * Copyright (C) 2016 Greenbone Networks GmbH
+ * Copyright (C) 2016 - 2017 Greenbone Networks GmbH
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -23,11 +23,14 @@
 
 import React from 'react';
 
+import Layout from './layout.js';
+
 export const Toolbar = props => {
   return (
-    <div className="toolbar">
+    <Layout flex align={['space-between', 'start']} {...props}
+      className="toolbar">
       {props.children}
-    </div>
+    </Layout>
   );
 };
 

_______________________________________________
Openvas-commits mailing list
Openvas-commits@wald.intevation.org
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-commits

Reply via email to