Skip to content

Commit

Permalink
Update forms styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesus89 committed Jul 19, 2018
1 parent 6e5d9c0 commit dacd461
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 17 deletions.
28 changes: 14 additions & 14 deletions app/scripts/services/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,6 @@ angular.module('icestudio')
title: gettextCatalog.getString('Enter the memory blocks'),
value: ''
},
{
type: 'checkbox',
label: gettextCatalog.getString('Local parameter'),
value: false
},
{
type: 'combobox',
label: gettextCatalog.getString('Address format'),
Expand All @@ -275,12 +270,17 @@ angular.module('icestudio')
{ value: 10, label: gettextCatalog.getString('Decimal') },
{ value: 16, label: gettextCatalog.getString('Hexadecimal') }
]
},
{
type: 'checkbox',
label: gettextCatalog.getString('Local parameter'),
value: false
}
];
utils.renderForm(formSpecs, function(evt, values) {
var labels = values[0].replace(/\s*,\s*/g, ',').split(',');
var local = values[1];
var format = parseInt(values[2]);
var local = values[2];
var format = parseInt(values[1]);
if (resultAlert) {
resultAlert.dismiss(false);
}
Expand Down Expand Up @@ -1064,11 +1064,6 @@ angular.module('icestudio')
title: gettextCatalog.getString('Update the block name'),
value: block.data.name
},
{
type: 'checkbox',
label: gettextCatalog.getString('Local parameter'),
value: block.data.local
},
{
type: 'combobox',
label: gettextCatalog.getString('Address format'),
Expand All @@ -1078,12 +1073,17 @@ angular.module('icestudio')
{ value: 10, label: gettextCatalog.getString('Decimal') },
{ value: 16, label: gettextCatalog.getString('Hexadecimal') }
]
},
{
type: 'checkbox',
label: gettextCatalog.getString('Local parameter'),
value: block.data.local
}
];
utils.renderForm(formSpecs, function(evt, values) {
var label = values[0];
var local = values[1];
var format = parseInt(values[2]);
var local = values[2];
var format = parseInt(values[1]);
if (resultAlert) {
resultAlert.dismiss(false);
}
Expand Down
3 changes: 0 additions & 3 deletions app/scripts/services/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,6 @@ angular.module('icestudio')
var spec = specs[i];
switch(spec.type) {
case 'text':
if (i > 0) {
content.push('<br>');
}
content.push('\
<p>' + spec.title + '</p>\
<input class="ajs-input" type="text" value="' + spec.value + '" id="form' + i.toString() + '"/>\
Expand Down
37 changes: 37 additions & 0 deletions app/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,52 @@ body {
animation-duration: 10ms;
}

.alertify .ajs-body .ajs-content p {
margin-top: 7px;
}

.alertify .ajs-body .ajs-content .ajs-input {
border-radius: 4px;
}

.ajs-header {
display: none;
}

.ajs-footer {
padding: 8px !important;
background: white !important;
border-top: none !important;
}

.checkbox {
margin-top: 14px;
}

.checkbox+.checkbox {
margin-top: 0px;
}

.form-group {
margin: 12px 0 15px;
}

.form-group label {
margin-bottom: 0px;
}

.form-group select {
height: 38px;
margin: 4px;
border-radius: 4px;
color: inherit;
box-shadow: none !important;
border: 1px solid #ccc !important;
}

.form-group select:focus {
outline: #ccc solid 1px !important;
}

input:focus {
outline: #ccc solid 1px;
Expand Down

0 comments on commit dacd461

Please sign in to comment.