Permalink
Browse files

step1 of “getting rid of bootstrap”

  • Loading branch information...
peh committed Feb 19, 2017
1 parent 941daae commit 078e7c1032110b83b533758634d8a8f9ff5ddcb9
Showing with 654 additions and 635 deletions.
  1. +14 −13 .bootstraprc
  2. +2 −2 grails-app/assets/javascripts/app.es6
  3. +26 −30 grails-app/assets/javascripts/app/components/application/application-add.js
  4. +51 −70 grails-app/assets/javascripts/app/components/application/application-settings.js
  5. +63 −36 grails-app/assets/javascripts/app/components/application/deployment-list.js
  6. +22 −24 grails-app/assets/javascripts/app/components/application/list.js
  7. +24 −32 grails-app/assets/javascripts/app/components/errors/details-table.js
  8. +119 −192 grails-app/assets/javascripts/app/components/errors/entry-details.js
  9. +22 −21 grails-app/assets/javascripts/app/components/errors/error-list.js
  10. +16 −16 grails-app/assets/javascripts/app/components/main.js
  11. +2 −3 grails-app/assets/javascripts/app/components/navbar/item.js
  12. +2 −2 grails-app/assets/javascripts/app/components/navbar/sidebar.js
  13. +3 −7 grails-app/assets/javascripts/app/components/tools/hero.js
  14. +2 −9 grails-app/assets/javascripts/app/components/tools/loading-hero.js
  15. +2 −2 grails-app/assets/javascripts/app/components/tools/with-role.js
  16. +16 −18 grails-app/assets/javascripts/app/components/users/login.js
  17. +2 −6 grails-app/assets/javascripts/app/components/users/user-details.js
  18. +21 −17 grails-app/assets/javascripts/app/components/users/user-list.js
  19. +0 −107 grails-app/assets/stylesheets/app/_sidebar.scss
  20. +2 −2 grails-app/assets/stylesheets/app/_variables.scss
  21. +45 −6 grails-app/assets/stylesheets/app/components/_entry-details.scss
  22. +1 −0 grails-app/assets/stylesheets/app/components/_entry-list.scss
  23. +58 −0 grails-app/assets/stylesheets/app/components/_forms.scss
  24. +99 −0 grails-app/assets/stylesheets/app/components/_sidebar.scss
  25. +39 −14 grails-app/assets/stylesheets/app/main.scss
  26. +1 −1 grails-app/views/page/app.gsp
  27. +0 −1 package.json
  28. +0 −4 webpack.dev.config.js
View
@@ -101,16 +101,17 @@ styles:
responsive-utilities: true
### Bootstrap scripts
scripts:
transition: true
alert: true
button: true
carousel: true
collapse: true
dropdown: true
modal: true
tooltip: true
popover: true
scrollspy: true
tab: true
affix: true
scripts: false
#scripts:
# transition: true
# alert: true
# button: true
# carousel: true
# collapse: true
# dropdown: true
# modal: true
# tooltip: true
# popover: true
# scrollspy: true
# tab: true
# affix: true
@@ -1,5 +1,5 @@
import App from "./app/app";
$(function () {
window.onload = () => {
new App().start();
});
};
@@ -23,9 +23,9 @@ export default class ApplicationAdd extends BaseComponent {
onFormSubmit(e) {
e.preventDefault();
if (this.state.application.dirty) {
this.getApplicationService().save(this.state.application).then((resp)=> {
this.getApplicationService().save(this.state.application).then((resp) => {
this.navigate((`/applications/${resp.application.id}`))
}).catch((err)=> {
}).catch((err) => {
this.showError("Could not save Application")
throw err
})
@@ -70,38 +70,34 @@ export default class ApplicationAdd extends BaseComponent {
});
return (
<div>
<div className="row mbottwenty" key="app-settings-header">
<div className="col-sm-12">
<div className="page-header">
<h3>Add Application</h3>
</div>
</div>
<section>
<div className="page-header">
<h3>Add Application</h3>
</div>
<div className="row" key="app-row">
<div className="col-sm-12">
<form method="POST" onSubmit={this.onFormSubmit} className="form-horizontal">
<div className="form-group">
<label htmlFor="name" className="col-sm-2 control-label">Name</label>
<div className="col-sm-10">
<input type="text" name="name" id="name" className="form-control" onChange={(e) => {
this.onValueChange('name', e.target.value)
}} required="required"/>
</div>
<div>
<form method="POST" onSubmit={this.onFormSubmit}>
<div className="group">
<label htmlFor="name">Name</label>
<div className="inputs">
<input type="text" name="name" id="name" className="form-control" onChange={(e) => {
this.onValueChange('name', e.target.value)
}} required="required"/>
</div>
<div className="form-group">
<div className="col-sm-offset-2 col-sm-10">
<button type="submit" className={classes}>
<i className="fa fa-floppy-o"></i>
&nbsp;Save
</button>
</div>
</div>
<div className="group">
<div className="inputs">
<button type="submit" className={classes}>
<i className="fa fa-floppy-o"></i> Save
</button>
</div>
</form>
</div>
</div>
{/*<div className="form-group">*/}
{/*<div className="col-sm-offset-2 col-sm-10">*/}
{/*</div>*/}
{/*</div>*/}
</form>
</div>
</div>
</section>
);
}
@@ -30,42 +30,35 @@ class AppSettingsForm extends BaseComponent {
'shake-rotate': saved && hasErorrs
});
return (
<div className="row" key="app-row">
<div className="col-sm-12">
<form onSubmit={onFormSubmit} className="form-horizontal">
<div className="form-group">
<label htmlFor="name" className="col-sm-2 control-label">Name</label>
<div className="col-sm-10">
<input type="text" name="name" id="name" className="form-control" value={application.name} onChange={(e)=> {
onValueChange('name', e.target.value)
}} required="required"/>
</div>
</div>
<div className="form-group">
<label htmlFor="apiKey" className="col-sm-2 control-label">ApiKey</label >
<div className="col-sm-10">
<input type="text" className="form-control" value={application.apiKey} readOnly={true}/>
</div>
</div>
<div className="form-group">
<div className="col-sm-offset-2 col-sm-10">
<div className="btn-group">
<button type="submit" className={classes}>
<i className="fa fa-floppy-o"></i > Save
</button>
<button onClick={this.props.onDelete} className="btn btn-danger">
<i className="fa fa-trash"></i > Delete
</button>
<button onClick={this.props.onClear} className="btn btn-warning">
<i className="fa fa-trash"></i > Clear
</button>
</div>
</div>
</div>
</form>
<form onSubmit={onFormSubmit}>
<div className="group">
<label htmlFor="name" className="col-sm-2 control-label">Name</label>
<div className="inputs">
<input type="text" name="name" id="name" value={application.name} onChange={(e) => {
onValueChange('name', e.target.value)
}} required="required"/>
</div>
</div>
</div>
<div className="group">
<label htmlFor="apiKey" className="col-sm-2 control-label">ApiKey</label >
<div className="inputs">
<input type="text" value={application.apiKey} readOnly={true}/>
</div>
</div>
<div className="group">
<div className="inputs">
<button type="submit" className={classes}>
<i className="fa fa-floppy-o"></i > Save
</button>
<button onClick={this.props.onDelete} className="btn btn-danger">
<i className="fa fa-trash"></i > Delete
</button>
<button onClick={this.props.onClear} className="btn btn-warning">
<i className="fa fa-trash"></i > Clear
</button>
</div>
</div>
</form>
)
}
else {
@@ -85,9 +78,9 @@ export default class AppSettingsView extends BaseComponent {
this._bindThis('_onFormSubmit', '_onValueChange', '_onDelete', '_onClear');
this.getApplicationService().get(props.appId).then((response)=> {
this.getApplicationService().get(props.appId).then((response) => {
this.setState(_.assign(this.state, {application: response.application, saved: false}));
}).catch((err)=> {
}).catch((err) => {
this.showError("Could not get Application information from server")
throw err
});
@@ -124,16 +117,16 @@ export default class AppSettingsView extends BaseComponent {
confirmButtonText: 'Yes',
cancelButtonText: 'No!',
closeOnConfirm: false
}, ()=> {
this.getApplicationService().del(app).then(()=> {
}, () => {
this.getApplicationService().del(app).then(() => {
swal({
title: 'Success',
text: 'We started a Job that will delete all the data of this App.',
type: 'success'
}, ()=> {
}, () => {
this.navigate('/applications');
})
}).catch((err)=> {
}).catch((err) => {
this.showError('Could not delete Application');
throw err
});
@@ -150,16 +143,16 @@ export default class AppSettingsView extends BaseComponent {
confirmButtonText: 'Yes',
cancelButtonText: 'No!',
closeOnConfirm: false
}, ()=> {
}, () => {
this.getApplicationService().clear(app)
.then(()=> {
.then(() => {
swal({
title: 'Success',
text: 'We started a Job that will delete all the data that was gathered until NOW.',
type: 'success'
})
})
.catch((err)=> {
.catch((err) => {
this.showError("Something went wrong while cleaning that application")
throw(err)
});
@@ -171,33 +164,21 @@ export default class AppSettingsView extends BaseComponent {
return <LoadingHero />
}
return (
<div>
<div className="row mbottwenty" key="app-settings-header">
<div className="col-sm-12">
<div className="page-header">
<h3>{this.state.application.name || 'Add Application'}</h3>
</div>
</div>
</div>
<div className="row">
<div className="col-sm-12">
<AppSettingsForm
errbuddyApp={this.props.errbuddyApp}
application={this.state.application}
onValueChange={this._onValueChange}
onFormSubmit={this._onFormSubmit}
onDelete={this._onDelete}
onClear={this._onClear}
saved={this.state.saved}
/>
</div>
</div>
<div className="row">
<div className="col-sm-12">
<DeploymentList application={this.state.application} errbuddyApp={this.props.errbuddyApp}/>
</div>
<section>
<div className="page-header">
<h3>{this.state.application.name || 'Add Application'}</h3>
</div>
</div>
<AppSettingsForm
errbuddyApp={this.props.errbuddyApp}
application={this.state.application}
onValueChange={this._onValueChange}
onFormSubmit={this._onFormSubmit}
onDelete={this._onDelete}
onClear={this._onClear}
saved={this.state.saved}
/>
<DeploymentList application={this.state.application} errbuddyApp={this.props.errbuddyApp}/>
</section>
)
}
}
Oops, something went wrong.

0 comments on commit 078e7c1

Please sign in to comment.