Skip to content

Commit 0b078b3

Browse files
committed
Entity picker: changed some CSS
1 parent f42aec6 commit 0b078b3

7 files changed

Lines changed: 22 additions & 18 deletions

File tree

src/Presentation/SmartStore.Web/Administration/Views/Product/_CreateOrUpdate.AssociatedProducts.cshtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@
8383
$('input[name=EntityPickerResult]').entityPicker('loadDialog', {
8484
url: '@Url.Action("EntityPicker", "Common", new { area = "" })',
8585
caption: '@T("Admin.Catalog.Products.AssociatedProducts.AddNew")',
86-
//disableIf: 'notSimpleProduct',
87-
//maxReturnValues: 3,
8886
onOkClicked: function (ids) {
8987
$({}).doAjax({
9088
type: 'POST',

src/Presentation/SmartStore.Web/Content/smartstore.entitypicker.css

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,29 @@
33
-------------------------------------------------------------- */
44

55
.entity-picker-list .item {
6-
float: left;
6+
display: inline-block;
77
width: 360px;
88
min-height: 54px;
99
max-height: 54px;
1010
padding: 3px;
11-
border-bottom: 1px solid #cfcfcf;
11+
margin: 2px 0 1px 0;
12+
border-radius: 8px;
13+
border: #d4d4d4 solid 1px;
14+
background-image: linear-gradient(to bottom, #fcfcfc, #e3e3e3);
15+
background-color: #FCF8F0;
1216
}
13-
.entity-picker-list .item:nth-child(odd) {
14-
padding-right: 10px;
17+
.entity-picker-list .selected {
18+
box-shadow: 0 0 0 1px #FFCB7C;
19+
border: #FFCB7C solid 1px;
20+
background-image: linear-gradient(to bottom, #fcfcfc, #FFCB7C);
21+
background-color: #F2EEE6;
1522
}
1623
.entity-picker-list .item:hover {
1724
cursor: pointer;
18-
background-color: #FFCB7C;
1925
}
20-
.entity-picker-list .selected {
21-
background-color: #FFCB7C;
26+
.entity-picker-list .item:not(.selected):hover {
27+
background-image: linear-gradient(to bottom, #fcfcfc, #cacaca);
28+
background-color: #F2EEE6;
2229
}
2330
.entity-picker-list .disable {
2431
opacity: .4;

src/Presentation/SmartStore.Web/Controllers/CommonController.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,6 @@ public ActionResult EntityPicker(EntityPickerModel model)
10731073
[HttpPost]
10741074
public ActionResult EntityPicker(EntityPickerModel model, FormCollection form)
10751075
{
1076-
//System.Threading.Thread.Sleep(3000);
10771076
model.PublishedString = T("Common.Published");
10781077
model.UnpublishedString = T("Common.Unpublished");
10791078

src/Presentation/SmartStore.Web/Scripts/smartstore.doAjax.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
$(opt.throbber).removeData('throbber').throbber({ white: true, small: true });
6969
}
7070
else if (opt.smallIcon) {
71-
$(opt.smallIcon).append('&nbsp;<span class="ajax-loader-small"></span>');
71+
$(opt.smallIcon).append('<span class="ajax-loader-small"></span>');
7272
}
7373
}
7474

src/Presentation/SmartStore.Web/Scripts/smartstore.entityPicker.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,15 +261,15 @@
261261
dialog.find('.list-footer').remove();
262262
}
263263
else {
264-
dialog.find('.entity-picker-list:first').empty();
264+
dialog.find('.entity-picker-list').empty();
265265
dialog.find('.modal-footer .btn-primary').prop('disabled', true);
266266
}
267267

268268
dialog.find('button[name=SearchEntities]').button('loading').prop('disabled', true);
269-
dialog.find('.entity-picker-list:first').append('&nbsp;<span class="ajax-loader-small"></span>');
269+
dialog.find('.entity-picker-list').append('<span class="ajax-loader-small"></span>');
270270
},
271271
success: function (response) {
272-
var list = dialog.find('.entity-picker-list:first'),
272+
var list = dialog.find('.entity-picker-list'),
273273
data = dialog.data('entitypicker');
274274

275275
list.append(response);
@@ -286,7 +286,7 @@
286286
},
287287
complete: function () {
288288
dialog.find('button[name=SearchEntities]').prop('disabled', false).button('reset');
289-
dialog.find('.entity-picker-list:first').find('span.ajax-loader-small').remove();
289+
dialog.find('.entity-picker-list').find('span.ajax-loader-small').remove();
290290
},
291291
error: ajaxErrorHandler
292292
});

src/Presentation/SmartStore.Web/Views/Common/EntityPicker.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
{
2020
@ProductSearchForm()
2121
}
22-
23-
<div class="entity-picker-list clearfix"></div>
22+
<div class="clear"></div>
23+
<div class="entity-picker-list"></div>
2424
</form>
2525
</div>
2626
<div class="modal-footer">

src/Presentation/SmartStore.Web/Views/Common/EntityPickerList.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
}
1414
@foreach (var item in Model.SearchResult ?? Enumerable.Empty<EntityPickerModel.SearchResultModel>())
1515
{
16-
<div class="item clearfix@(item.Disable ? " disable" : "")" data-id="@item.Id" data-returnvalue="@item.ReturnValue">
16+
<div class="item@(item.Disable ? " disable" : "")" data-id="@item.Id" data-returnvalue="@item.ReturnValue">
1717
@if (item.ImageUrl.HasValue())
1818
{
1919
<div class="thumb">

0 commit comments

Comments
 (0)