Nicer display of "add new" inline functionality.

TODO:

Handle validation failures in a less fugly way
This commit is contained in:
snipe
2015-07-28 11:58:45 -07:00
parent fe2fb63007
commit 1e38ced885
3 changed files with 25 additions and 20 deletions
+5 -5
View File
@@ -163,7 +163,7 @@
@endif
<span class="mac_spinner" style="padding-left: 10px; color: green; display:none; width: 30px;"><i class="fa fa-spinner fa-spin"></i> </span>
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="model" data-select="model_select_id">Add new Model...</a> <!-- onclick="return dependency('model')" -->
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="model" data-select="model_select_id"><i class="verticon fa fa-plus-square-o fa-2x"></i></a> <!-- onclick="return dependency('model')" -->
{{ $errors->first('model_id', '<br><span class="alert-msg"><i class="fa fa-times"></i> :message</span>') }}
</div>
</div>
@@ -192,7 +192,7 @@
<label for="supplier_id" class="col-md-2 control-label">@lang('admin/hardware/form.supplier')</label>
<div class="col-md-7 col-sm-12">
{{ Form::select('supplier_id', $supplier_list , Input::old('supplier_id', $asset->supplier_id), array('class'=>'select2', 'style'=>'min-width:350px','id'=>'supplier_select_id')) }}
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="supplier" data-select='supplier_select_id'>Add new Supplier...</a>
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="supplier" data-select='supplier_select_id'><i class="verticon fa fa-plus-square-o fa-2x"></i></a>
{{ $errors->first('supplier_id', '<br><span class="alert-msg"><i class="fa fa-times"></i> :message</span>') }}
</div>
</div>
@@ -242,7 +242,7 @@
<label for="status_id" class="col-md-2 control-label">@lang('admin/hardware/form.status') <i class='fa fa-asterisk'></i></label>
<div class="col-md-7 col-sm-12 col-sm-12">
{{ Form::select('status_id', $statuslabel_list , Input::old('status_id', $asset->status_id), array('class'=>'select2 status_id', 'style'=>'width:350px','id'=>'status_select_id')) }}
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency='statuslabel' data-select='status_select_id'>Add new Status...</a>
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency='statuslabel' data-select='status_select_id'><i class="verticon fa fa-plus-square-o fa-2x"></i></a>
<span class="status_spinner" style="padding-left: 10px; color: green; display:none; width: 30px;"><i class="fa fa-spinner fa-spin"></i> </span>
<p class="help-block">@lang('admin/hardware/form.help_checkout')</p>
@@ -257,7 +257,7 @@
</label>
<div class="col-md-7 col-sm-12">
{{ Form::select('assigned_to', $assigned_to , Input::old('assigned_to', $asset->assigned_to), array('class'=>'select2', 'id'=>'assigned_to', 'style'=>'min-width:350px')) }}
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="user" data-select='assigned_to'>Add new User...</a>
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="user" data-select='assigned_to'><i class="verticon fa fa-plus-square-o fa-2x"></i></a>
{{ $errors->first('assigned_to', '<br><span class="alert-msg"><i class="fa fa-times"></i> :message</span>') }}
</div>
</div>
@@ -277,7 +277,7 @@
<label for="rtd_location_id" class="col-md-2 control-label">@lang('admin/hardware/form.default_location')</label>
<div class="col-md-7 col-sm-12">
{{ Form::select('rtd_location_id', $location_list , Input::old('rtd_location_id', $asset->rtd_location_id), array('class'=>'select2', 'style'=>'width:350px','id'=>'rtd_location_select')) }}
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency='location' data-select='rtd_location_select'>Add new Location...</a>
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency='location' data-select='rtd_location_select'><i class="verticon fa fa-plus-square-o fa-2x"></i></a>
{{ $errors->first('rtd_location_id', '<br><span class="alert-msg"><i class="fa fa-times"></i> :message</span>') }}
</div>
</div>
+2 -1
View File
@@ -19,7 +19,7 @@
<!-- bootstrap -->
<link href="{{ asset('assets/css/bootstrap/bootstrap.css') }}" rel="stylesheet" />
<link href="{{ asset('assets/css/bootstrap/bootstrap-overrides.css') }}" type="text/css" rel="stylesheet" />
<!-- global styles -->
<link rel="stylesheet" type="text/css" href="{{ asset('assets/css/compiled/layout.css') }}">
@@ -40,6 +40,7 @@
<link rel="stylesheet" href="{{ asset('assets/css/compiled/dataTables.colVis.css') }}" type="text/css" media="screen" />
<link rel="stylesheet" href="{{ asset('assets/css/compiled/dataTables.tableTools.css') }}" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="{{ asset('assets/css/compiled/print.css') }}" media="print" />
<link href="{{ asset('assets/css/bootstrap/bootstrap-overrides.css') }}" type="text/css" rel="stylesheet" />
<!-- global header javascripts -->
+18 -14
View File
@@ -21,7 +21,7 @@ h1,h2,h3,h4,h5,h6{
}
/* alerts */
.alert [class^="icon-"],
.alert [class^="icon-"],
.alert [class*=" icon-"] {
font-size: 27px;
position: relative;
@@ -31,15 +31,15 @@ h1,h2,h3,h4,h5,h6{
display: inline-block;
color: #f1c359;
}
.alert-success [class^="icon-"],
.alert-success [class^="icon-"],
.alert-success [class*=" icon-"] {
color: #81ad53;
}
.alert-info [class^="icon-"],
.alert-info [class^="icon-"],
.alert-info [class*=" icon-"] {
color: #4993c6;
}
.alert-danger [class^="icon-"],
.alert-danger [class^="icon-"],
.alert-danger [class*=" icon-"] {
color: #d5393e;
}
@@ -60,7 +60,7 @@ textarea {
}
input[type="text"],
input[type="password"],
textarea {
textarea {
font-size: 13px;
-webkit-box-shadow: inset 0 0px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 0px 1px rgba(0, 0, 0, 0.075);
@@ -105,7 +105,7 @@ input[type="password"].inline-input:hover {
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus{
textarea:focus{
border-color: #A2CEF0;
-webkit-box-shadow: inset 0 0px 1px rgba(0, 0, 0, 0.075), 0 0 4px rgba(82, 168, 236, 0.6);
-moz-box-shadow: inset 0 0px 1px rgba(0, 0, 0, 0.075), 0 0 4px rgba(82, 168, 236, 0.6);
@@ -173,9 +173,9 @@ textarea::-webkit-input-placeholder {
/* PREPEND & APPEND INPUT */
.input-group input,
.input-group input,
.input-group .uneditable-input,
.input-group input,
.input-group input,
.input-group .uneditable-input,
.input-group .uneditable-input {
border: 1px solid #d6e2eb;
}
@@ -240,11 +240,11 @@ textarea::-webkit-input-placeholder {
/* dropdown caret */
.dropdown .caret {
position: relative;
top: -1px;
top: -1px;
}
/* dropdown active */
.dropdown.open > a,
.dropdown.open > a:hover,
.dropdown.open > a,
.dropdown.open > a:hover,
.dropdown.open > a:focus {
border-color: #101417;
}
@@ -273,7 +273,7 @@ textarea::-webkit-input-placeholder {
border-bottom-color: #333e4a;
border-right-color: #566676;
border-left-color: #566676;
}
}
.pagination.inverse a:hover,
.pagination.inverse span:hover {
background-color: #000;
@@ -344,4 +344,8 @@ table th span.line{
}
}
.verticon {
font-size:30px;
vertical-align: middle;
padding-left: 5px;
}