Skip to content

Commit

Permalink
Merge branch 'master' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
squallstar committed Oct 12, 2022
2 parents bf8d498 + 1f0ae0a commit db8be52
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{#if items.length}}
<div data-list-id="{{id}}" data-filter-id="{{id}}" data-list-uuid="{{uuid}}" class="list list-default {{#if swipeToSave}}list-swipe-save{{/if}}">
<div data-list-1-0-1-id="{{id}}" data-filter-id="{{id}}" data-list-uuid="{{uuid}}" class="list list-default {{#if swipeToSave}}list-swipe-save{{/if}}">
{{#if swipeToSave}}
<div class="filter-wrapper">
<ul class="list-save-filter">
Expand Down
15 changes: 7 additions & 8 deletions js/build.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
Fliplet.Widget.instance('list', function(data) {
Fliplet.Widget.instance('list-1-0-1', function(data) {
var $container = $(this);
var _this = this;

$container.find('.linked[data-list-item-id]').click(function(event) {
event.preventDefault();

var $container = $(this);
var $listItem = $(this);

if ($container.parents('.list-swipe.swiping').length) {
if ($listItem.parents('.list-swipe.swiping').length) {
return;
}

var data = Fliplet.Widget.getData($container.parents('[data-list-id]').attr('data-list-id'));
var itemData = _.find(data.items, {
id: $container.attr('data-list-item-id')
id: $listItem.attr('data-list-item-id')
});

if (!_.isUndefined(itemData) && (!_.isUndefined(itemData.linkAction) && !_.isEmpty(itemData.linkAction))) {
Fliplet.Navigate.to(itemData.linkAction);
}
});

var swipeToSaveLabel = data.swipeToSaveLabel || T('widgets.list.noImages.defaultListName');

Fliplet().then(function() {
var swipeToSaveLabel = data.swipeToSaveLabel || T('widgets.list.noImages.defaultListName');

$container.translate({ swipeToSaveLabel: swipeToSaveLabel });

if (data.swipeToSave) {
window.ui = window.ui || {};
window.ui['swipeSavedList' + $container.attr('data-list-uuid')] = new SwipeSaveList(_this, {
window.ui['swipeSavedList' + data.uuid] = new SwipeSaveList(_this, {
savedListLabel: swipeToSaveLabel
});
}
Expand Down

0 comments on commit db8be52

Please sign in to comment.