From 0563b0a0fd97a9d5836f5392779677bb74f4ed08 Mon Sep 17 00:00:00 2001 From: Yaroslav Ovdii Date: Thu, 13 Aug 2020 14:54:16 +0300 Subject: [PATCH 1/3] fixed key access --- js/build.templates.js | 55 ++++----- js/layout-javascript/agenda-code.js | 87 +++++++++++--- js/layout-javascript/news-feed-code.js | 112 ++++++++++++++---- js/layout-javascript/simple-list-code.js | 81 ++++++++++--- js/layout-javascript/small-card-code.js | 41 +++++-- js/layout-javascript/small-h-card-code.js | 26 +++- templates/build/agenda-base.build.hbs | 16 +-- templates/build/agenda-cards-detail.build.hbs | 20 ++-- templates/build/agenda-cards-loop.build.hbs | 4 +- .../agenda-cards-search-results.build.hbs | 2 +- templates/build/agenda-dates-loop.build.hbs | 2 +- templates/build/agenda-filters.build.hbs | 4 +- templates/build/news-feed-base.build.hbs | 26 ++-- templates/build/news-feed-comment.build.hbs | 2 +- templates/build/news-feed-detail.build.hbs | 20 ++-- templates/build/news-feed-filters.build.hbs | 4 +- templates/build/news-feed-loop.build.hbs | 4 +- .../build/news-feed-single-comment.build.hbs | 2 +- templates/build/simple-list-base.build.hbs | 26 ++-- templates/build/simple-list-comment.build.hbs | 2 +- templates/build/simple-list-detail.build.hbs | 20 ++-- templates/build/simple-list-filters.build.hbs | 4 +- templates/build/simple-list-loop.build.hbs | 4 +- .../simple-list-single-comment.build.hbs | 2 +- templates/build/small-card-base.build.hbs | 16 +-- templates/build/small-card-detail.build.hbs | 22 ++-- templates/build/small-card-filters.build.hbs | 4 +- templates/build/small-card-loop.build.hbs | 2 +- templates/build/small-h-card-base.build.hbs | 6 +- templates/build/small-h-card-detail.build.hbs | 16 +-- templates/build/small-h-card-loop.build.hbs | 2 +- 31 files changed, 417 insertions(+), 217 deletions(-) diff --git a/js/build.templates.js b/js/build.templates.js index 39448563..ea14ec74 100644 --- a/js/build.templates.js +++ b/js/build.templates.js @@ -3,51 +3,51 @@ this["Fliplet"]["Widget"] = this["Fliplet"]["Widget"] || {}; this["Fliplet"]["Widget"]["Templates"] = this["Fliplet"]["Widget"]["Templates"] || {}; this["Fliplet"]["Widget"]["Templates"]["templates.build.agenda-base"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
\n \n {{#if filtersInOverlay}}\n
\n
\n
\n
\n
\n \n
\n
\n
\n
Clear
\n
Apply
\n
\n
\n
\n
\n
\n
\n
Filter by
\n
\n \n
\n
\n
\n
\n
\n
\n {{/if}}\n \n\n \n
\n {{#if searchEnabled}}\n
\n \n \n
Search
\n
\n
\n {{/if}}\n {{#ifCond filtersEnabled '||' bookmarksEnabled}}\n
\n {{#ifCond bookmarksEnabled '&&' hasTopBar}}\n
\n \n \n
\n {{/ifCond}}\n
\n {{#if filtersEnabled}}\n \n {{/if}}\n
\n {{/ifCond}}\n
\n \n\n {{#if bookmarksEnabled}}\n {{#unless hasTopBar}}\n
\n
\n \n \n
My Agenda
\n
\n
\n {{/unless}}\n {{/if}}\n\n \n
\n
    \n \n
\n
\n\n \n
\n
\n \n
\n \n
\n
\n Loading agenda...\n
\n
\n
\n\n \n
\n \n
\n {{#if searchEnabled}}\n
\n
\n
\n
\n
\n Searching for \n
\n
\n
\n
\n
\n {{/if}}\n {{#if filtersEnabled}}\n
\n
\n {{#unless filtersInOverlay}}\n {{#if filtersEnabled}}\n
\n \n
\n {{/if}}\n {{/unless}}\n
\n
\n {{/if}}\n
\n \n
\n
\n
\n\n\n
\n
\n
\n
\n
\n \"close\n
\n
\n
\n \n
\n
\n
\n
\n \"close\n
\n
\n
\n\n{{#if showAddEntry}}\n
\n \n
\n{{/if}}"; + return "
\n \n {{#if filtersInOverlay}}\n
\n
\n
\n
\n
\n \n
\n
\n
\n
Clear
\n
Apply
\n
\n
\n
\n
\n
\n
\n
Filter by
\n
\n \n
\n
\n
\n
\n
\n
\n {{/if}}\n \n\n \n
\n {{#if searchEnabled}}\n
\n \n \n
Search
\n
\n
\n {{/if}}\n {{#ifCond filtersEnabled '||' bookmarksEnabled}}\n
\n {{#ifCond bookmarksEnabled '&&' hasTopBar}}\n
\n \n \n
\n {{/ifCond}}\n
\n {{#if filtersEnabled}}\n \n {{/if}}\n
\n {{/ifCond}}\n
\n \n\n {{#if bookmarksEnabled}}\n {{#unless hasTopBar}}\n
\n
\n \n \n
My Agenda
\n
\n
\n {{/unless}}\n {{/if}}\n\n \n
\n
    \n \n
\n
\n\n \n
\n
\n \n
\n \n
\n
\n Loading agenda...\n
\n
\n
\n\n \n
\n \n
\n {{#if searchEnabled}}\n
\n
\n
\n
\n
\n Searching for \n
\n
\n
\n
\n
\n {{/if}}\n {{#if filtersEnabled}}\n
\n
\n {{#unless filtersInOverlay}}\n {{#if filtersEnabled}}\n
\n \n
\n {{/if}}\n {{/unless}}\n
\n
\n {{/if}}\n
\n \n
\n
\n
\n\n\n
\n
\n
\n
\n
\n \"close\n
\n
\n
\n \n
\n
\n
\n
\n \"close\n
\n
\n
\n\n{{#if showAddEntry}}\n
\n \n
\n{{/if}}"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.agenda-cards-detail"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
\n
\n {{#if [Title]}}\n

{{[Title]}}

\n {{/if}}\n
\n {{#if [Location]}}\n

{{{[Location]}}}

\n {{/if}}\n

{{[Start Time]}}{{#ifCond [Start Time] '&&' [End Time]}} - {{/ifCond}}{{[End Time]}}{{#if [Full Date]}} / {{/if}}{{moment [Full Date] format=\"D MMM YYYY\"}}

\n
\n\n
\n
\n
\n Bookmark\n
\n
\n Bookmarked\n
\n\n
\n
\n {{#if pollButton}}\n
\n Poll\n
\n {{/if}}\n {{#if surveyButton}}\n
\n Survey\n
\n {{/if}}\n {{#if questionsButton}}\n
\n Questions\n
\n {{/if}}\n
\n\n
\n {{#each entryDetails}}\n \n {{#ifCond type '==' 'image'}}\n {{#if content}}\n {{#if labelEnabled}}\n
{{label}}
\n {{/if}}\n {{#if (isSingle content)}}\n {{#each content}}\n
\n \n
\n {{/each}}\n {{else}}\n
\n {{#each content}}\n
\n \n
\n {{/each}}\n
\n {{/if}}\n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'text'}}\n {{#if content}}\n {{#if labelEnabled}}\n
{{label}}
\n {{/if}}\n\n
{{content}}
\n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'html'}}\n {{#if content}}\n {{#if labelEnabled}}\n
{{label}}
\n {{/if}}\n\n
{{{auth content}}}
\n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'url'}}\n {{#if content}}\n {{#if labelEnabled}}\n
{{label}}
\n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'tel'}}\n {{#if content}}\n {{#if labelEnabled}}\n
{{label}}
\n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'mail'}}\n {{#if content}}\n {{#if labelEnabled}}\n
{{label}}
\n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'date'}}\n {{#if content}}\n {{#if labelEnabled}}\n
{{label}}
\n {{/if}}\n\n
{{formatDate content}}
\n {{/if}}\n {{/ifCond}}\n {{/each}}\n
\n\n {{#ifCond editEntry '||' deleteEntry}}\n
\n {{#if editEntry}}\n
Edit
\n {{/if}}\n {{#if deleteEntry}}\n
Delete
\n {{/if}}\n
\n {{/ifCond}}\n
\n
"; + return "
\n
\n {{#if [Title]}}\n

{{[Title]}}

\n {{/if}}\n
\n {{#if [Location]}}\n

{{{[Location]}}}

\n {{/if}}\n

{{[Start Time]}}{{#ifCond [Start Time] '&&' [End Time]}} - {{/ifCond}}{{[End Time]}}{{#if [Full Date]}} / {{/if}}{{moment [Full Date] format=\"D MMM YYYY\"}}

\n
\n\n
\n
\n
\n Bookmark\n
\n
\n Bookmarked\n
\n\n
\n
\n {{#if pollButton}}\n
\n Poll\n
\n {{/if}}\n {{#if surveyButton}}\n
\n Survey\n
\n {{/if}}\n {{#if questionsButton}}\n
\n Questions\n
\n {{/if}}\n
\n\n
\n {{#each entryDetails}}\n \n {{#ifCond type '==' 'image'}}\n {{#if content}}\n {{#if labelEnabled}}\n
{{label}}
\n {{/if}}\n {{#if (isSingle content)}}\n {{#each content}}\n
\n \n
\n {{/each}}\n {{else}}\n
\n {{#each content}}\n
\n \n
\n {{/each}}\n
\n {{/if}}\n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'text'}}\n {{#if content}}\n {{#if labelEnabled}}\n
{{label}}
\n {{/if}}\n\n
{{content}}
\n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'html'}}\n {{#if content}}\n {{#if labelEnabled}}\n
{{label}}
\n {{/if}}\n\n
{{{auth content}}}
\n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'url'}}\n {{#if content}}\n {{#if labelEnabled}}\n
{{label}}
\n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'tel'}}\n {{#if content}}\n {{#if labelEnabled}}\n
{{label}}
\n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'mail'}}\n {{#if content}}\n {{#if labelEnabled}}\n
{{label}}
\n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'date'}}\n {{#if content}}\n {{#if labelEnabled}}\n
{{label}}
\n {{/if}}\n\n
{{formatDate content}}
\n {{/if}}\n {{/ifCond}}\n {{/each}}\n
\n\n {{#ifCond editEntry '||' deleteEntry}}\n
\n {{#if editEntry}}\n
Edit
\n {{/if}}\n {{#if deleteEntry}}\n
Delete
\n {{/if}}\n
\n {{/ifCond}}\n
\n
"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.agenda-cards-loop"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#each this}}\n
\n
\n {{#each this}}\n
\n
\n
\n
\n
\n
{{[Start Time]}}
\n {{#ifCond [Start Time] '&&' [End Time]}}\n
|
\n {{/ifCond}}\n
{{[End Time]}}
\n
\n
\n {{#if [Title]}}\n

{{[Title]}}

\n {{/if}}\n
\n {{#if [Location]}}\n

{{{[Location]}}}

\n {{/if}}\n

{{[Start Time]}}{{#ifCond [Start Time] '&&' [End Time]}} - {{/ifCond}}{{[End Time]}}{{#if [Full Date]}} / {{/if}}{{[Full Date]}}

\n
\n\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n {{/each}}\n
\n
Nothing bookmarked for this date
\n
\n {{/each}}"; + return "{{#each this}}\n
\n
\n {{#each this}}\n
\n
\n
\n
\n
\n
{{[Start Time]}}
\n {{#ifCond [Start Time] '&&' [End Time]}}\n
|
\n {{/ifCond}}\n
{{[End Time]}}
\n
\n
\n {{#if [Title]}}\n

{{[Title]}}

\n {{/if}}\n
\n {{#if [Location]}}\n

{{{[Location]}}}

\n {{/if}}\n

{{[Start Time]}}{{#ifCond [Start Time] '&&' [End Time]}} - {{/ifCond}}{{[End Time]}}{{#if [Full Date]}} / {{/if}}{{[Full Date]}}

\n
\n\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n {{/each}}\n
\n
Nothing bookmarked for this date
\n
\n {{/each}}"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.agenda-cards-search-results"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
\n{{#unless this}}\n

No results found

\n

No results found in bookmarks
Disable bookmarks to search all items

\n{{/unless}}\n{{#each this}}\n

{{moment this.0.[Full Date] format=\"ddd D MMM\"}}

\n
\n {{#each this}}\n
\n
\n
\n
\n
\n
{{[Start Time]}}
\n {{#ifCond [Start Time] '&&' [End Time]}}\n
|
\n {{/ifCond}}\n
{{[End Time]}}
\n
\n
\n {{#if [Title]}}\n

{{[Title]}}

\n {{/if}}\n
\n {{#if [Location]}}\n

{{{[Location]}}}

\n {{/if}}\n

{{[Start Time]}}{{#ifCond [Start Time] '&&' [End Time]}} - {{/ifCond}}{{[End Time]}}{{#if [Full Date]}} / {{/if}}{{[Full Date]}}

\n
\n\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n {{/each}}\n
\n{{/each}}\n
\n"; + return "
\n{{#unless this}}\n

No results found

\n

No results found in bookmarks
Disable bookmarks to search all items

\n{{/unless}}\n{{#each this}}\n

{{moment this.0.[Full Date] format=\"ddd D MMM\"}}

\n
\n {{#each this}}\n
\n
\n
\n
\n
\n
{{[Start Time]}}
\n {{#ifCond [Start Time] '&&' [End Time]}}\n
|
\n {{/ifCond}}\n
{{[End Time]}}
\n
\n
\n {{#if [Title]}}\n

{{[Title]}}

\n {{/if}}\n
\n {{#if [Location]}}\n

{{{[Location]}}}

\n {{/if}}\n

{{[Start Time]}}{{#ifCond [Start Time] '&&' [End Time]}} - {{/ifCond}}{{[End Time]}}{{#if [Full Date]}} / {{/if}}{{[Full Date]}}

\n
\n\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n {{/each}}\n
\n{{/each}}\n
\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.agenda-dates-loop"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#each this}}\n
  • \n
    {{week}}
    \n
    {{day}}
    \n
    {{month}}
    \n
  • \n{{/each}}"; + return "{{#each this}}\n
  • \n
    {{week}}
    \n
    {{day}}
    \n
    {{month}}
    \n
  • \n{{/each}}"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.agenda-filters"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#if filtersInOverlay}}\n
    \n {{#each filters}}\n
    \n
    \n

    \n \n {{[name]}}\n \n \n

    \n
    \n
    \n
    \n \n
    \n
    \n
    \n {{/each}}\n
    \n{{else}}\n {{#each filters}}\n
    Filter by {{[name]}}
    \n
    \n
    \n \n
    \n
    \n {{/each}}\n{{/if}}"; + return "{{#if filtersInOverlay}}\n
    \n {{#each filters}}\n
    \n
    \n

    \n \n {{[name]}}\n \n \n

    \n
    \n
    \n
    \n \n
    \n
    \n
    \n {{/each}}\n
    \n{{else}}\n {{#each filters}}\n
    Filter by {{[name]}}
    \n
    \n
    \n \n
    \n
    \n {{/each}}\n{{/if}}"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.news-feed-base"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
    \n \n {{#if filtersInOverlay}}\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    Clear
    \n
    Apply
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    Filter by
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n {{/if}}\n \n\n \n
    \n
    Go back
    \n
    \n\n \n
    \n {{#if searchEnabled}}\n
    \n \n \n
    Search
    \n
    \n
    \n {{/if}}\n {{#ifCond filtersEnabled '||' bookmarksEnabled}}\n
    \n {{#if bookmarksEnabled}}\n
    \n \n \n
    \n {{/if}}\n
    \n {{#if filtersEnabled}}\n \n {{/if}}\n
    \n {{/ifCond}}\n
    \n \n\n \n {{#if searchEnabled}}\n
    \n
    \n
    \n
    \n
    \n Searching for \n
    \n
    \n
    \n
    \n
    \n {{/if}}\n {{#if filtersEnabled}}\n
    \n
    \n {{#unless filtersInOverlay}}\n {{#if filtersEnabled}}\n
    \n \n
    \n {{/if}}\n {{/unless}}\n
    \n
    \n {{/if}}\n \n\n
    \n \n
    \n\n {{#if enabledLimitEntries}}\n
    \n {{#ifCond limitEntries '==' 0}}\n {{#ifCond searchEnabled '||' filtersEnabled}}\n

    {{#if searchEnabled}}Search{{/if}}{{#ifCond searchEnabled '&&' filtersEnabled}} and/or {{/ifCond}}{{#if filtersEnabled}}Filter{{/if}} to see the list items

    \n {{/ifCond}}\n {{/ifCond}}\n {{#ifCond limitEntries '>' 0}}\n

    Showing the first {{limitEntries}} list items.{{#ifCond searchEnabled '||' filtersEnabled}} {{#if searchEnabled}}Search{{/if}}{{#ifCond searchEnabled '&&' filtersEnabled}} and/or {{/ifCond}}{{#if filtersEnabled}}Filter{{/if}} to see more.{{/ifCond}}

    \n {{/ifCond}}\n
    \n {{/if}}\n\n
    \n Loading...\n
    \n
    \n No matches found\n
    \n
    \n Nothing bookmarked\n
    \n
    \n\n\n
    \n
    \n
    \n
    \n
    \n \"close\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \"close\n
    \n
    \n
    \n\n{{#if showAddEntry}}\n
    \n \n
    \n{{/if}}\n\n
    \n
    \n
    Comments
    \n
    \n
    \n\n
    You are offline
    \n\n
    \n \n
    \n Loading...\n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    Comment
    \n
    Cancel
    \n
    Save
    \n
    \n
    \n
    \n"; + return "
    \n \n {{#if filtersInOverlay}}\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    Clear
    \n
    Apply
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    Filter by
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n {{/if}}\n \n\n \n
    \n
    Go back
    \n
    \n\n \n
    \n {{#if searchEnabled}}\n
    \n \n \n
    Search
    \n
    \n
    \n {{/if}}\n {{#ifCond filtersEnabled '||' bookmarksEnabled}}\n
    \n {{#if bookmarksEnabled}}\n
    \n \n \n
    \n {{/if}}\n
    \n {{#if filtersEnabled}}\n \n {{/if}}\n
    \n {{/ifCond}}\n
    \n \n\n \n {{#if searchEnabled}}\n
    \n
    \n
    \n
    \n
    \n Searching for \n
    \n
    \n
    \n
    \n
    \n {{/if}}\n {{#if filtersEnabled}}\n
    \n
    \n {{#unless filtersInOverlay}}\n {{#if filtersEnabled}}\n
    \n \n
    \n {{/if}}\n {{/unless}}\n
    \n
    \n {{/if}}\n \n\n
    \n \n
    \n\n {{#if enabledLimitEntries}}\n
    \n {{#ifCond limitEntries '==' 0}}\n {{#ifCond searchEnabled '||' filtersEnabled}}\n

    {{#if searchEnabled}}Search{{/if}}{{#ifCond searchEnabled '&&' filtersEnabled}} and/or {{/ifCond}}{{#if filtersEnabled}}Filter{{/if}} to see the list items

    \n {{/ifCond}}\n {{/ifCond}}\n {{#ifCond limitEntries '>' 0}}\n

    Showing the first {{limitEntries}} list items.{{#ifCond searchEnabled '||' filtersEnabled}} {{#if searchEnabled}}Search{{/if}}{{#ifCond searchEnabled '&&' filtersEnabled}} and/or {{/ifCond}}{{#if filtersEnabled}}Filter{{/if}} to see more.{{/ifCond}}

    \n {{/ifCond}}\n
    \n {{/if}}\n\n
    \n Loading...\n
    \n
    \n No matches found\n
    \n
    \n Nothing bookmarked\n
    \n
    \n\n\n
    \n
    \n
    \n
    \n
    \n \"close\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \"close\n
    \n
    \n
    \n\n{{#if showAddEntry}}\n
    \n \n
    \n{{/if}}\n\n
    \n
    \n
    Comments
    \n
    \n
    \n\n
    You are offline
    \n\n
    \n \n
    \n Loading...\n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    Comment
    \n
    Cancel
    \n
    Save
    \n
    \n
    \n
    \n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.news-feed-comment"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#each this}}\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    {{ userName }}{{ literalDate }}
    \n
    {{ formatComment text }}
    \n
    \n
    \n
    \n {{/each}}"; + return "{{#each this}}\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    {{ userName }}{{ literalDate }}
    \n
    {{ formatComment text }}
    \n
    \n
    \n
    \n {{/each}}"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.news-feed-detail"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
    \n {{#if [Image]}}\n
    \n \n
    \n {{/if}}\n
    \n
    \n
    \n {{#ifCond [Date] '||' [Categories]}}\n
    {{formatDate [Date]}} {{#ifCond [Date] '&&' [Categories]}}/{{/ifCond}} {{[Categories]}}
    \n {{/ifCond}}\n {{#if likesEnabled}}\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {{/if}}\n\n {{#if bookmarksEnabled}}\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {{/if}}\n\n {{#if commentsEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n
    \n {{#if [Title]}}\n

    {{[Title]}}

    \n {{/if}}\n {{#if [Content]}}\n
    \n {{{auth [Content]}}}\n
    \n {{/if}}\n
    \n {{#each entryDetails}}\n \n {{#ifCond type '==' 'image'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n {{#if (isSingle content)}}\n {{#each content}}\n
    \n \n
    \n {{/each}}\n {{else}}\n
    \n {{#each content}}\n
    \n \n
    \n {{/each}}\n
    \n {{/if}}\n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'text'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{content}}
    \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'html'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{{auth content}}}
    \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'url'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'tel'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'mail'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'date'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{formatDate content}}
    \n {{/if}}\n {{/ifCond}}\n {{/each}}\n
    \n
    \n {{#ifCond editEntry '||' deleteEntry}}\n
    \n {{#if editEntry}}\n
    Edit
    \n {{/if}}\n {{#if deleteEntry}}\n
    Delete
    \n {{/if}}\n
    \n {{/ifCond}}\n {{#if commentsEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n
    \n
    \n
    \n
    "; + return "
    \n {{#if [Image]}}\n
    \n \n
    \n {{/if}}\n
    \n
    \n
    \n {{#ifCond [Date] '||' [Categories]}}\n
    {{formatDate [Date]}} {{#ifCond [Date] '&&' [Categories]}}/{{/ifCond}} {{[Categories]}}
    \n {{/ifCond}}\n {{#if likesEnabled}}\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {{/if}}\n\n {{#if bookmarksEnabled}}\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {{/if}}\n\n {{#if commentsEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n
    \n {{#if [Title]}}\n

    {{[Title]}}

    \n {{/if}}\n {{#if [Content]}}\n
    \n {{{auth [Content]}}}\n
    \n {{/if}}\n
    \n {{#each entryDetails}}\n \n {{#ifCond type '==' 'image'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n {{#if (isSingle content)}}\n {{#each content}}\n
    \n \n
    \n {{/each}}\n {{else}}\n
    \n {{#each content}}\n
    \n \n
    \n {{/each}}\n
    \n {{/if}}\n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'text'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{content}}
    \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'html'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{{auth content}}}
    \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'url'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'tel'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'mail'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'date'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{formatDate content}}
    \n {{/if}}\n {{/ifCond}}\n {{/each}}\n
    \n
    \n {{#ifCond editEntry '||' deleteEntry}}\n
    \n {{#if editEntry}}\n
    Edit
    \n {{/if}}\n {{#if deleteEntry}}\n
    Delete
    \n {{/if}}\n
    \n {{/ifCond}}\n {{#if commentsEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n
    \n
    \n
    \n
    "; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.news-feed-filters"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#if filtersInOverlay}}\n
    \n {{#each filters}}\n
    \n
    \n

    \n \n {{[name]}}\n \n \n

    \n
    \n
    \n
    \n \n
    \n
    \n
    \n {{/each}}\n
    \n{{else}}\n {{#each filters}}\n
    Filter by {{[name]}}
    \n
    \n
    \n \n
    \n
    \n {{/each}}\n{{/if}}"; + return "{{#if filtersInOverlay}}\n
    \n {{#each filters}}\n
    \n
    \n

    \n \n {{[name]}}\n \n \n

    \n
    \n
    \n
    \n \n
    \n
    \n
    \n {{/each}}\n
    \n{{else}}\n {{#each filters}}\n
    Filter by {{[name]}}
    \n
    \n
    \n \n
    \n
    \n {{/each}}\n{{/if}}"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.news-feed-loop"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#each this}}\n
    \n
    \n {{#if [Image]}}\n
    \n
    \n \n
    \n
    \n {{/if}}\n
    \n
    \n
    \n {{#ifCond [Date] '||' [Categories]}}\n
    {{formatDate [Date]}} {{#ifCond [Date] '&&' [Categories]}}/{{/ifCond}} {{[Categories]}}
    \n {{/ifCond}}\n {{#if likesEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n\n {{#if bookmarksEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n\n {{#if commentsEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n
    \n {{#if [Title]}}\n

    {{[Title]}}

    \n {{/if}}\n {{#if [Content]}}\n
    \n {{{auth [Content]}}}\n
    \n {{/if}}\n
    \n
    \n
    \n
    \n{{/each}}"; + return "{{#each this}}\n
    \n
    \n {{#if [Image]}}\n
    \n
    \n \n
    \n
    \n {{/if}}\n
    \n
    \n
    \n {{#ifCond [Date] '||' [Categories]}}\n
    {{formatDate [Date]}} {{#ifCond [Date] '&&' [Categories]}}/{{/ifCond}} {{[Categories]}}
    \n {{/ifCond}}\n {{#if likesEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n\n {{#if bookmarksEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n\n {{#if commentsEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n
    \n {{#if [Title]}}\n

    {{[Title]}}

    \n {{/if}}\n {{#if [Content]}}\n
    \n {{{auth [Content]}}}\n
    \n {{/if}}\n
    \n
    \n
    \n
    \n{{/each}}"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.news-feed-single-comment"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
    \n
    \n
    \n
    \n \n
    \n
    \n
    {{ userName }}{{ literalDate }}
    \n
    {{ formatComment text }}
    \n
    \n
    \n
    "; + return "
    \n
    \n
    \n
    \n \n
    \n
    \n
    {{ userName }}{{ literalDate }}
    \n
    {{ formatComment text }}
    \n
    \n
    \n
    "; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.news-feed-temp-comment"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { @@ -55,27 +55,27 @@ this["Fliplet"]["Widget"]["Templates"]["templates.build.news-feed-temp-comment"] },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.simple-list-base"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
    \n \n {{#if filtersInOverlay}}\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    Clear
    \n
    Apply
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    Filter by
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n {{/if}}\n \n\n \n
    \n
    Go back
    \n
    \n\n \n
    \n {{#if searchEnabled}}\n
    \n \n \n
    Search
    \n
    \n
    \n {{/if}}\n {{#ifCond filtersEnabled '||' bookmarksEnabled}}\n
    \n {{#if bookmarksEnabled}}\n
    \n \n \n
    \n {{/if}}\n
    \n {{#if filtersEnabled}}\n \n {{/if}}\n
    \n {{/ifCond}}\n
    \n \n\n \n {{#if searchEnabled}}\n
    \n
    \n
    \n
    \n
    \n Searching for \n
    \n
    \n
    \n
    \n
    \n {{/if}}\n {{#if filtersEnabled}}\n
    \n
    \n {{#unless filtersInOverlay}}\n {{#if filtersEnabled}}\n
    \n \n
    \n {{/if}}\n {{/unless}}\n
    \n
    \n {{/if}}\n \n\n
    \n \n
    \n\n {{#if enabledLimitEntries}}\n
    \n {{#ifCond limitEntries '==' 0}}\n {{#ifCond searchEnabled '||' filtersEnabled}}\n

    {{#if searchEnabled}}Search{{/if}}{{#ifCond searchEnabled '&&' filtersEnabled}} and/or {{/ifCond}}{{#if filtersEnabled}}Filter{{/if}} to see the list items

    \n {{/ifCond}}\n {{/ifCond}}\n {{#ifCond limitEntries '>' 0}}\n

    Showing the first {{limitEntries}} list items.{{#ifCond searchEnabled '||' filtersEnabled}} {{#if searchEnabled}}Search{{/if}}{{#ifCond searchEnabled '&&' filtersEnabled}} and/or {{/ifCond}}{{#if filtersEnabled}}Filter{{/if}} to see more.{{/ifCond}}

    \n {{/ifCond}}\n
    \n {{/if}}\n\n
    \n Loading...\n
    \n
    \n No matches found\n
    \n
    \n Nothing bookmarked\n
    \n
    \n\n\n
    \n
    \n
    \n
    \n
    \n
    \n \"close\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \"close\n
    \n
    \n
    \n\n{{#if showAddEntry}}\n
    \n \n
    \n{{/if}}\n\n
    \n
    \n
    Comments
    \n
    \n
    \n\n
    You are offline
    \n\n
    \n \n
    \n Loading...\n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    Comment
    \n
    Cancel
    \n
    Save
    \n
    \n
    \n
    \n"; + return "
    \n \n {{#if filtersInOverlay}}\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    Clear
    \n
    Apply
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    Filter by
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n {{/if}}\n \n\n \n
    \n
    Go back
    \n
    \n\n \n
    \n {{#if searchEnabled}}\n
    \n \n \n
    Search
    \n
    \n
    \n {{/if}}\n {{#ifCond filtersEnabled '||' bookmarksEnabled}}\n
    \n {{#if bookmarksEnabled}}\n
    \n \n \n
    \n {{/if}}\n
    \n {{#if filtersEnabled}}\n \n {{/if}}\n
    \n {{/ifCond}}\n
    \n \n\n \n {{#if searchEnabled}}\n
    \n
    \n
    \n
    \n
    \n Searching for \n
    \n
    \n
    \n
    \n
    \n {{/if}}\n {{#if filtersEnabled}}\n
    \n
    \n {{#unless filtersInOverlay}}\n {{#if filtersEnabled}}\n
    \n \n
    \n {{/if}}\n {{/unless}}\n
    \n
    \n {{/if}}\n \n\n
    \n \n
    \n\n {{#if enabledLimitEntries}}\n
    \n {{#ifCond limitEntries '==' 0}}\n {{#ifCond searchEnabled '||' filtersEnabled}}\n

    {{#if searchEnabled}}Search{{/if}}{{#ifCond searchEnabled '&&' filtersEnabled}} and/or {{/ifCond}}{{#if filtersEnabled}}Filter{{/if}} to see the list items

    \n {{/ifCond}}\n {{/ifCond}}\n {{#ifCond limitEntries '>' 0}}\n

    Showing the first {{limitEntries}} list items.{{#ifCond searchEnabled '||' filtersEnabled}} {{#if searchEnabled}}Search{{/if}}{{#ifCond searchEnabled '&&' filtersEnabled}} and/or {{/ifCond}}{{#if filtersEnabled}}Filter{{/if}} to see more.{{/ifCond}}

    \n {{/ifCond}}\n
    \n {{/if}}\n\n
    \n Loading...\n
    \n
    \n No matches found\n
    \n
    \n Nothing bookmarked\n
    \n
    \n\n\n
    \n
    \n
    \n
    \n
    \n
    \n \"close\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \"close\n
    \n
    \n
    \n\n{{#if showAddEntry}}\n
    \n \n
    \n{{/if}}\n\n
    \n
    \n
    Comments
    \n
    \n
    \n\n
    You are offline
    \n\n
    \n \n
    \n Loading...\n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    Comment
    \n
    Cancel
    \n
    Save
    \n
    \n
    \n
    \n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.simple-list-comment"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#each this}}\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    {{ userName }}{{ literalDate }}
    \n
    {{ formatComment text }}
    \n
    \n
    \n
    \n {{/each}}"; + return "{{#each this}}\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    {{ userName }}{{ literalDate }}
    \n
    {{ formatComment text }}
    \n
    \n
    \n
    \n {{/each}}"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.simple-list-detail"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
    \n {{#each data}}\n \n {{#ifCond type '==' 'image'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n {{#if (isSingle content)}}\n {{#each content}} \n
    \n \n
    \n {{/each}}\n {{else}}\n
    \n {{#each content}}\n
    \n \n
    \n {{/each}}\n
    \n {{/if}}\n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'text'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{content}}
    \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'html'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{{auth content}}}
    \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'url'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'tel'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'mail'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'date'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{formatDate content}}
    \n {{/if}}\n {{/ifCond}}\n {{/each}}\n\n \n
    \n {{#ifCond editEntry '||' deleteEntry}}\n
    \n {{#if editEntry}}\n
    Edit
    \n {{/if}}\n {{#if deleteEntry}}\n
    Delete
    \n {{/if}}\n
    \n {{/ifCond}}\n
    \n {{#if likesEnabled}}\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {{/if}}\n\n {{#if bookmarksEnabled}}\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {{/if}}\n\n {{#if commentsEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n
    \n
    \n
    "; + return "
    \n {{#each data}}\n \n {{#ifCond type '==' 'image'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n {{#if (isSingle content)}}\n {{#each content}} \n
    \n \n
    \n {{/each}}\n {{else}}\n
    \n {{#each content}}\n
    \n \n
    \n {{/each}}\n
    \n {{/if}}\n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'text'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{content}}
    \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'html'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{{auth content}}}
    \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'url'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'tel'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'mail'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'date'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{formatDate content}}
    \n {{/if}}\n {{/ifCond}}\n {{/each}}\n\n \n
    \n {{#ifCond editEntry '||' deleteEntry}}\n
    \n {{#if editEntry}}\n
    Edit
    \n {{/if}}\n {{#if deleteEntry}}\n
    Delete
    \n {{/if}}\n
    \n {{/ifCond}}\n
    \n {{#if likesEnabled}}\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {{/if}}\n\n {{#if bookmarksEnabled}}\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {{/if}}\n\n {{#if commentsEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n
    \n
    \n
    "; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.simple-list-filters"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#if filtersInOverlay}}\n
    \n {{#each filters}}\n
    \n
    \n

    \n \n {{[name]}}\n \n \n

    \n
    \n
    \n
    \n \n
    \n
    \n
    \n {{/each}}\n
    \n{{else}}\n {{#each filters}}\n {{#if data.length}}\n
    Filter by {{[name]}}
    \n
    \n
    \n \n
    \n
    \n {{/if}}\n {{/each}}\n{{/if}}"; + return "{{#if filtersInOverlay}}\n
    \n {{#each filters}}\n
    \n
    \n

    \n \n {{[name]}}\n \n \n

    \n
    \n
    \n
    \n \n
    \n
    \n
    \n {{/each}}\n
    \n{{else}}\n {{#each filters}}\n {{#if data.length}}\n
    Filter by {{[name]}}
    \n
    \n
    \n \n
    \n
    \n {{/if}}\n {{/each}}\n{{/if}}"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.simple-list-loop"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#each this}}\n
    \n {{#if [Image]}}\n
    \n {{/if}}\n
    \n {{#if [Title]}}\n
    {{[Title]}}
    \n {{/if}}\n {{#if [Description]}}\n
    {{plaintext [Description]}}
    \n {{/if}}\n {{#if [Category]}}\n
    {{[Category]}}
    \n {{/if}}\n
    \n {{#if likesEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n {{#if bookmarksEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n {{#if commentsEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n
    \n
    \n \n
    \n{{/each}}"; + return "{{#each this}}\n
    \n {{#if [Image]}}\n
    \n {{/if}}\n
    \n {{#if [Title]}}\n
    {{[Title]}}
    \n {{/if}}\n {{#if [Description]}}\n
    {{plaintext [Description]}}
    \n {{/if}}\n {{#if [Category]}}\n
    {{[Category]}}
    \n {{/if}}\n
    \n {{#if likesEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n {{#if bookmarksEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n {{#if commentsEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n
    \n
    \n \n
    \n{{/each}}"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.simple-list-single-comment"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
    \n
    \n
    \n
    \n \n
    \n
    \n
    {{ userName }}{{ literalDate }}
    \n
    {{ formatComment text }}
    \n
    \n
    \n
    "; + return "
    \n
    \n
    \n
    \n \n
    \n
    \n
    {{ userName }}{{ literalDate }}
    \n
    {{ formatComment text }}
    \n
    \n
    \n
    "; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.simple-list-temp-comment"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { @@ -83,19 +83,19 @@ this["Fliplet"]["Widget"]["Templates"]["templates.build.simple-list-temp-comment },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.small-card-base"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
    \n \n {{#if filtersInOverlay}}\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    Clear
    \n
    Apply
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    Filter by
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n {{/if}}\n \n\n \n
    \n
    Go back
    \n
    \n\n \n
    \n
    \n
    \n
    \n
    \n\n {{#if searchEnabled}}\n
    \n \n \n
    Search
    \n
    \n
    \n {{/if}}\n
    \n {{#if bookmarksEnabled}}\n
    \n \n \n
    \n {{/if}}\n
    \n {{#if filtersEnabled}}\n \n {{/if}}\n
    \n
    \n \n\n \n {{#if searchEnabled}}\n
    \n
    \n
    \n
    \n
    \n Searching for \n
    \n
    \n
    \n
    \n
    \n {{/if}}\n {{#if filtersEnabled}}\n
    \n
    \n {{#unless filtersInOverlay}}\n {{#if filtersEnabled}}\n
    \n \n
    \n {{/if}}\n {{/unless}}\n
    \n
    \n {{/if}}\n \n\n
    \n \n
    \n\n {{#if enabledLimitEntries}}\n
    \n {{#ifCond limitEntries '==' 0}}\n {{#ifCond searchEnabled '||' filtersEnabled}}\n

    {{#if searchEnabled}}Search{{/if}}{{#ifCond searchEnabled '&&' filtersEnabled}} and/or {{/ifCond}}{{#if filtersEnabled}}Filter{{/if}} to see the list items

    \n {{/ifCond}}\n {{/ifCond}}\n {{#ifCond limitEntries '>' 0}}\n

    Showing the first {{limitEntries}} list items.{{#ifCond searchEnabled '||' filtersEnabled}} {{#if searchEnabled}}Search{{/if}}{{#ifCond searchEnabled '&&' filtersEnabled}} and/or {{/ifCond}}{{#if filtersEnabled}}Filter{{/if}} to see more.{{/ifCond}}

    \n {{/ifCond}}\n
    \n {{/if}}\n\n
    \n Loading...\n
    \n
    \n No matches found\n
    \n
    \n Nothing bookmarked\n
    \n
    \n\n\n
    \n
    \n
    \n
    \n
    \n \"close\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \"close\n
    \n
    \n
    \n\n{{#if showAddEntry}}\n
    \n \n
    \n{{/if}}\n"; + return "
    \n \n {{#if filtersInOverlay}}\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    Clear
    \n
    Apply
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    Filter by
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n {{/if}}\n \n\n \n
    \n
    Go back
    \n
    \n\n \n
    \n
    \n
    \n
    \n
    \n\n {{#if searchEnabled}}\n
    \n \n \n
    Search
    \n
    \n
    \n {{/if}}\n
    \n {{#if bookmarksEnabled}}\n
    \n \n \n
    \n {{/if}}\n
    \n {{#if filtersEnabled}}\n \n {{/if}}\n
    \n
    \n \n\n \n {{#if searchEnabled}}\n
    \n
    \n
    \n
    \n
    \n Searching for \n
    \n
    \n
    \n
    \n
    \n {{/if}}\n {{#if filtersEnabled}}\n
    \n
    \n {{#unless filtersInOverlay}}\n {{#if filtersEnabled}}\n
    \n \n
    \n {{/if}}\n {{/unless}}\n
    \n
    \n {{/if}}\n \n\n
    \n \n
    \n\n {{#if enabledLimitEntries}}\n
    \n {{#ifCond limitEntries '==' 0}}\n {{#ifCond searchEnabled '||' filtersEnabled}}\n

    {{#if searchEnabled}}Search{{/if}}{{#ifCond searchEnabled '&&' filtersEnabled}} and/or {{/ifCond}}{{#if filtersEnabled}}Filter{{/if}} to see the list items

    \n {{/ifCond}}\n {{/ifCond}}\n {{#ifCond limitEntries '>' 0}}\n

    Showing the first {{limitEntries}} list items.{{#ifCond searchEnabled '||' filtersEnabled}} {{#if searchEnabled}}Search{{/if}}{{#ifCond searchEnabled '&&' filtersEnabled}} and/or {{/ifCond}}{{#if filtersEnabled}}Filter{{/if}} to see more.{{/ifCond}}

    \n {{/ifCond}}\n
    \n {{/if}}\n\n
    \n Loading...\n
    \n
    \n No matches found\n
    \n
    \n Nothing bookmarked\n
    \n
    \n\n\n
    \n
    \n
    \n
    \n
    \n \"close\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \"close\n
    \n
    \n
    \n\n{{#if showAddEntry}}\n
    \n \n
    \n{{/if}}\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.small-card-detail"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#if [Image]}}\n
    \n
    \n {{#unless [Image]}}{{/unless}}\n
    \n{{/if}}\n
    \n
    \n {{#if bookmarksEnabled}}\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {{/if}}\n {{#ifCond [First Name] '||' [Last Name] }}\n
    {{[First Name]}} {{[Last Name]}}
    \n {{/ifCond}}\n
    {{[Title]}}
    \n
    {{[Location]}}
    \n
    \n {{#if [Email]}}\n \n {{/if}}\n {{#if [Telephone]}}\n \n {{/if}}\n {{#if [Linkedin]}}\n \n {{/if}}\n
    \n\n
    \n {{#each entryDetails}}\n \n {{#ifCond type '==' 'image'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n {{#if (isSingle content)}}\n {{#each content}}\n
    \n \n
    \n {{/each}}\n {{else}}\n
    \n {{#each content}}\n
    \n \n
    \n {{/each}}\n
    \n {{/if}}\n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'text'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{content}}
    \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'html'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{{auth content}}}
    \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'url'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'tel'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'mail'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'date'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{formatDate content}}
    \n {{/if}}\n {{/ifCond}}\n {{/each}}\n
    \n\n \n {{#ifCond editEntry '||' deleteEntry}}\n
    \n {{#if editEntry}}\n
    Edit
    \n {{/if}}\n {{#if deleteEntry}}\n
    Delete
    \n {{/if}}\n
    \n {{/ifCond}}\n
    \n
    \n"; + return "{{#if [Image]}}\n
    \n
    \n {{#unless [Image]}}{{/unless}}\n
    \n{{/if}}\n
    \n
    \n {{#if bookmarksEnabled}}\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {{/if}}\n {{#ifCond [First Name] '||' [Last Name] }}\n
    {{[First Name]}} {{[Last Name]}}
    \n {{/ifCond}}\n
    {{[Title]}}
    \n
    {{[Location]}}
    \n
    \n {{#if [Email]}}\n \n {{/if}}\n {{#if [Telephone]}}\n \n {{/if}}\n {{#if [Linkedin]}}\n \n {{/if}}\n
    \n\n
    \n {{#each entryDetails}}\n \n {{#ifCond type '==' 'image'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n {{#if (isSingle content)}}\n {{#each content}}\n
    \n \n
    \n {{/each}}\n {{else}}\n
    \n {{#each content}}\n
    \n \n
    \n {{/each}}\n
    \n {{/if}}\n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'text'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{content}}
    \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'html'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{{auth content}}}
    \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'url'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'tel'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'mail'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'date'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{formatDate content}}
    \n {{/if}}\n {{/ifCond}}\n {{/each}}\n
    \n\n \n {{#ifCond editEntry '||' deleteEntry}}\n
    \n {{#if editEntry}}\n
    Edit
    \n {{/if}}\n {{#if deleteEntry}}\n
    Delete
    \n {{/if}}\n
    \n {{/ifCond}}\n
    \n
    \n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.small-card-filters"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#if filtersInOverlay}}\n
    \n {{#each filters}}\n
    \n
    \n

    \n \n {{[name]}}\n \n \n

    \n
    \n
    \n
    \n \n
    \n
    \n
    \n {{/each}}\n
    \n{{else}}\n {{#each filters}}\n
    Filter by {{[name]}}
    \n
    \n
    \n \n
    \n
    \n {{/each}}\n{{/if}}\n"; + return "{{#if filtersInOverlay}}\n
    \n {{#each filters}}\n
    \n
    \n

    \n \n {{[name]}}\n \n \n

    \n
    \n
    \n
    \n \n
    \n
    \n
    \n {{/each}}\n
    \n{{else}}\n {{#each filters}}\n
    Filter by {{[name]}}
    \n
    \n
    \n \n
    \n
    \n {{/each}}\n{{/if}}\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.small-card-loop"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#each this}}\n
    \n
    \n
    \n {{#if [Image]}}\n
    \n
    \n {{#unless [Image]}}{{/unless}}\n
    \n {{/if}}\n
    \n
    \n
    \n
    {{[First Name]}} {{[Last Name]}}
    \n
    {{[Title]}}
    \n
    {{[Location]}}
    \n {{#if bookmarksEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n
    \n
    \n {{/each}}\n"; + return "{{#each this}}\n
    \n
    \n
    \n {{#if [Image]}}\n
    \n
    \n {{#unless [Image]}}{{/unless}}\n
    \n {{/if}}\n
    \n
    \n
    \n
    {{[First Name]}} {{[Last Name]}}
    \n
    {{[Title]}}
    \n
    {{[Location]}}
    \n {{#if bookmarksEnabled}}\n
    \n \n \n \n
    \n {{/if}}\n
    \n
    \n {{/each}}\n"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.small-card-profile-icon"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { @@ -107,18 +107,13 @@ this["Fliplet"]["Widget"]["Templates"]["templates.build.small-card-user-profile" },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.small-h-card-base"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
    \n
    \n \n
    \n
    \n Loading...\n
    \n
    \n\n\n
    \n
    \n
    \n
    \n
    \n \"close\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \"close\n
    \n
    \n
    \n\n{{#if showAddEntry}}\n
    \n \n
    \n{{/if}}"; + return "
    \n
    \n \n
    \n
    \n Loading...\n
    \n
    \n\n\n
    \n
    \n
    \n
    \n
    \n \"close\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \"close\n
    \n
    \n
    \n\n{{#if showAddEntry}}\n
    \n \n
    \n{{/if}}"; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.small-h-card-detail"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#if [Image]}}\n
    \n
    \n {{#unless [Image]}}{{/unless}}\n
    \n{{/if}}\n
    \n
    \n
    {{[First Name]}} {{[Last Name]}}
    \n
    {{[Title]}}
    \n
    {{[Location]}}
    \n
    \n {{#if [Email]}}\n \n {{/if}}\n {{#if [Telephone]}}\n \n {{/if}}\n {{#if [Linkedin]}}\n \n {{/if}}\n
    \n\n
    \n {{#each entryDetails}}\n \n {{#ifCond type '==' 'image'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n {{#if (isSingle content)}}\n {{#each content}}\n
    \n \n
    \n {{/each}}\n {{else}}\n
    \n {{#each content}}\n
    \n \n
    \n {{/each}}\n
    \n {{/if}}\n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'text'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{content}}
    \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'html'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{{auth content}}}
    \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'url'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'tel'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'mail'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'date'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{formatDate content}}
    \n {{/if}}\n {{/ifCond}}\n {{/each}}\n
    \n\n \n {{#ifCond editEntry '||' deleteEntry}}\n
    \n {{#if editEntry}}\n
    Edit
    \n {{/if}}\n {{#if deleteEntry}}\n
    Delete
    \n {{/if}}\n
    \n {{/ifCond}}\n
    \n
    "; + return "{{#if [Image]}}\n
    \n
    \n {{#unless [Image]}}{{/unless}}\n
    \n{{/if}}\n
    \n
    \n
    {{[First Name]}} {{[Last Name]}}
    \n
    {{[Title]}}
    \n
    {{[Location]}}
    \n
    \n {{#if [Email]}}\n \n {{/if}}\n {{#if [Telephone]}}\n \n {{/if}}\n {{#if [Linkedin]}}\n \n {{/if}}\n
    \n\n
    \n {{#each entryDetails}}\n \n {{#ifCond type '==' 'image'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n {{#if (isSingle content)}}\n {{#each content}}\n
    \n \n
    \n {{/each}}\n {{else}}\n
    \n {{#each content}}\n
    \n \n
    \n {{/each}}\n
    \n {{/if}}\n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'text'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{content}}
    \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'html'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{{auth content}}}
    \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'url'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'tel'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'mail'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n \n {{/if}}\n {{/ifCond}}\n\n \n {{#ifCond type '==' 'date'}}\n {{#if content}}\n {{#if labelEnabled}}\n
    {{label}}
    \n {{/if}}\n\n
    {{formatDate content}}
    \n {{/if}}\n {{/ifCond}}\n {{/each}}\n
    \n\n \n {{#ifCond editEntry '||' deleteEntry}}\n
    \n {{#if editEntry}}\n
    Edit
    \n {{/if}}\n {{#if deleteEntry}}\n
    Delete
    \n {{/if}}\n
    \n {{/ifCond}}\n
    \n
    "; },"useData":true}); this["Fliplet"]["Widget"]["Templates"]["templates.build.small-h-card-loop"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#each this}}\n
    \n tabindex=\"0\">\n
    \n
    \n
    \n
    \n {{#unless [Image]}}{{/unless}}\n
    \n
    \n
    \n
    {{[First Name]}} {{[Last Name]}}
    \n
    \n{{/each}}"; -},"useData":true}); - -this["Fliplet"]["Widget"]["Templates"]["templates.photoswipe.photoswipe"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "\n\n\n
    \n\n \n
    \n\n \n
    \n\n \n
    \n
    \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n \n\n
    \n\n \n\n \n\n \n\n \n\n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n \n\n \n\n \n\n
    \n
    \n
    \n\n
    \n\n
    \n\n
    "; - + return "{{#each this}}\n
    \n
    \n
    \n
    \n
    \n {{#unless [Image]}}{{/unless}}\n
    \n
    \n
    \n
    {{[First Name]}} {{[Last Name]}}
    \n
    \n{{/each}}"; },"useData":true}); \ No newline at end of file diff --git a/js/layout-javascript/agenda-code.js b/js/layout-javascript/agenda-code.js index 9e51d7a8..62755254 100644 --- a/js/layout-javascript/agenda-code.js +++ b/js/layout-javascript/agenda-code.js @@ -194,7 +194,11 @@ DynamicList.prototype.attachObservers = function() { _this.hideFilterOverlay(); _this.clearFilters(); }) - .on('click', '.hidden-filter-controls-filter', function() { + .on('click keydown', '.hidden-filter-controls-filter', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + var $filter = $(this); Fliplet.Analytics.trackEvent({ @@ -236,6 +240,7 @@ DynamicList.prototype.attachObservers = function() { _this.$container.find('.hidden-filter-controls').addClass('active'); _this.$container.find('.list-search-cancel').addClass('active'); + _this.$container.find('[data-filter-group]').show(); $el.addClass('active'); _this.toggleListView(); @@ -279,7 +284,11 @@ DynamicList.prototype.attachObservers = function() { _this.$container.find('.clear-filters').removeClass('hidden'); }) - .on('click', '.list-search-cancel', function() { + .on('click keydown', '.list-search-cancel', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + // Hide filters $(this).removeClass('active'); _this.$container.find('.hidden-filter-controls').removeClass('active'); @@ -354,12 +363,20 @@ DynamicList.prototype.attachObservers = function() { _this.isSearching = true; _this.searchData(value); }) - .on('click', '.clear-search', function() { + .on('click keydown', '.clear-search', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + _this.$container.find('.new-agenda-list-container').removeClass('searching'); _this.isSearching = false; _this.searchData(''); }) - .on('click', '.go-to-poll', function() { + .on('click keydown', '.go-to-poll', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + if (!_this.data.pollEnabled || !_this.data.pollColumn) { return; } @@ -374,7 +391,11 @@ DynamicList.prototype.attachObservers = function() { entry: entry }); }) - .on('click', '.go-to-survey', function() { + .on('click keydown', '.go-to-survey', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + if (!_this.data.surveyEnabled || !_this.data.surveyColumn) { return; } @@ -389,7 +410,11 @@ DynamicList.prototype.attachObservers = function() { entry: entry }); }) - .on('click', '.go-to-questions', function() { + .on('click keydown', '.go-to-questions', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + if (!_this.data.questionsEnabled || !_this.data.questionsColumn) { return; } @@ -430,10 +455,14 @@ DynamicList.prototype.attachObservers = function() { : 'bookmarks_hide' }); }) - .on('click', '.toggle-agenda, .toggle-bookmarks', function(e) { - e.stopPropagation(); + .on('click keydown', '.toggle-agenda, .toggle-bookmarks', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + + event.stopPropagation(); - var $toggle = _this.$container.find(e.handleObj.selector); + var $toggle = _this.$container.find(event.handleObj.selector); $toggle.toggleClass('mixitup-control-active'); _this.$container.find('.new-agenda-list-container').toggleClass('show-bookmarks'); @@ -461,7 +490,11 @@ DynamicList.prototype.attachObservers = function() { allowClick = true; }, 100); }) - .on('click', '.agenda-list-item', function(event) { + .on('click keydown', '.agenda-list-item', function(event) { + if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { + return; + } + if (_this.isPanning && !_this.allowClick && $(this).hasClass('open')) { return; } @@ -578,7 +611,11 @@ DynamicList.prototype.attachObservers = function() { return; } }) - .on('click', '.agenda-date-selector li', function() { + .on('click keydown', '.agenda-date-selector li', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + // prevents clicking the active one // prevents clicking the placeholder if ($(this).hasClass('active') || $(this).hasClass('placeholder')) { @@ -607,7 +644,11 @@ DynamicList.prototype.attachObservers = function() { return; } }) - .on('click', '.dynamic-list-add-item', function() { + .on('click keydown', '.dynamic-list-add-item', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + if (!_this.data.addEntryLinkAction) { return; } @@ -639,7 +680,11 @@ DynamicList.prototype.attachObservers = function() { }); } }) - .on('click', '.dynamic-list-edit-item', function() { + .on('click keydown', '.dynamic-list-edit-item', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + if (!_this.data.editEntryLinkAction) { return; } @@ -673,7 +718,11 @@ DynamicList.prototype.attachObservers = function() { }); } }) - .on('click', '.dynamic-list-delete-item', function() { + .on('click keydown', '.dynamic-list-delete-item', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + var _that = $(this); var entryID = $(this).parents('.agenda-item-inner-content').data('entry-id'); var options = { @@ -735,7 +784,11 @@ DynamicList.prototype.attachObservers = function() { Fliplet.UI.Actions(options); }); }) - .on('click', '.agenda-detail-overlay .bookmark-wrapper, .search-results-wrapper .bookmark-wrapper', function() { + .on('click keydown', '.agenda-detail-overlay .bookmark-wrapper, .search-results-wrapper .bookmark-wrapper', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + var id = $(this).parents('.agenda-detail-wrapper, .agenda-list-item').data('entry-id'); var record = _.find(_this.listItems, { id: id }); @@ -1796,8 +1849,8 @@ DynamicList.prototype.setupBookmarkButton = function(options) { name: Fliplet.Env.get('pageTitle') + '/' + title, likeLabel: '', likedLabel: '', - likeWrapper: '
    ', - likedWrapper: '
    ', + likeWrapper: '
    ', + likedWrapper: '
    ', addType: 'prepend', getAllCounts: false, liked: record.bookmarked, diff --git a/js/layout-javascript/news-feed-code.js b/js/layout-javascript/news-feed-code.js index 2d4df128..70617624 100644 --- a/js/layout-javascript/news-feed-code.js +++ b/js/layout-javascript/news-feed-code.js @@ -170,7 +170,11 @@ DynamicList.prototype.attachObservers = function() { _this.hideFilterOverlay(); _this.clearFilters(); }) - .on('click', '.hidden-filter-controls-filter', function() { + .on('click keydown', '.hidden-filter-controls-filter', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + var $filter = $(this); Fliplet.Analytics.trackEvent({ @@ -203,11 +207,18 @@ DynamicList.prototype.attachObservers = function() { _this.allowClick = true; }, 100); }) - .on('click', '.news-feed-list-item', function(event) { + .on('click keydown', '.news-feed-list-item', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + + if ($(event.target).hasClass('news-feed-info-holder') || $(event.target).parents('.news-feed-info-holder').length) { return; } + _this.$container.find('.news-feed-list-wrapper').hide(); + var entryId = $(this).data('entry-id'); var entryTitle = $(this).find('.news-feed-item-title').text().trim(); var beforeOpen = Promise.resolve(); @@ -256,6 +267,8 @@ DynamicList.prototype.attachObservers = function() { return; } + _this.$container.find('.news-feed-list-wrapper').show(); + var result; if ($(this).hasClass('go-previous-screen')) { @@ -313,6 +326,7 @@ DynamicList.prototype.attachObservers = function() { $parentElement.find('.hidden-filter-controls').addClass('active'); $parentElement.find('.list-search-cancel').addClass('active'); + $parentElement.find('[data-filter-group]').show(); $elementClicked.addClass('active'); _this.calculateFiltersHeight($parentElement); @@ -436,7 +450,11 @@ DynamicList.prototype.attachObservers = function() { _this.isSearching = true; _this.searchData(value); }) - .on('click', '.clear-search', function() { + .on('click keydown', '.clear-search', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + _this.$container.find('.new-news-feed-list-container').removeClass('searching'); _this.isSearching = false; _this.searchData(''); @@ -447,8 +465,14 @@ DynamicList.prototype.attachObservers = function() { .on('hide.bs.collapse', '.news-feed-filters-panel .panel-collapse', function() { $(this).siblings('.panel-heading').find('.fa-angle-up').removeClass('fa-angle-up').addClass('fa-angle-down'); }) - .on('click', '.news-feed-comment-holder', function(e) { - e.stopPropagation(); + .on('click keydown', '.news-feed-comment-holder', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + + _this.$container.find('.news-feed-list-wrapper').hide(); + + event.stopPropagation(); var identifier; if (_this.$container.find('.new-news-feed-list-container').hasClass('overlay-open')) { identifier = $(this).parents('.news-feed-details-content-holder').data('entry-id'); @@ -463,14 +487,23 @@ DynamicList.prototype.attachObservers = function() { action: 'comments_open' }); }) - .on('click', '.news-feed-comment-close-panel', function() { + .on('click keydown', '.news-feed-comment-close-panel', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + + _this.$container.find('.news-feed-list-wrapper').show(); _this.$container.find('.new-news-feed-comment-panel').removeClass('open'); _this.$container.find('.news-feed-list-item.open .slide-over').removeClass('lock'); if (!_this.$container.find('.news-feed-detail-overlay').hasClass('open')) { $('body').removeClass('lock'); } }) - .on('click', '.news-feed-comment-input-holder .comment', function() { + .on('click keydown', '.news-feed-comment-input-holder .comment', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + var entryId = _this.$container.find('.news-feed-list-item.open').data('entry-id') || _this.entryClicked; var $commentArea = $(this).parents('.news-feed-comment-input-holder').find('[data-comment-body]'); var comment = $commentArea.val().trim(); @@ -528,7 +561,11 @@ DynamicList.prototype.attachObservers = function() { $(this).parents('.news-feed-comment-input-holder').removeClass('ready'); } }) - .on('click', '.news-feed-comment-input-holder .save', function() { + .on('click keydown', '.news-feed-comment-input-holder .save', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + var commentId = _this.$container.find('.fl-individual-comment.editing').data('id'); var entryId = _this.$container.find('.news-feed-list-item.open').data('entry-id') || _this.entryClicked; var $commentArea = $(this).parents('.news-feed-comment-input-holder').find('[data-comment-body]'); @@ -548,7 +585,11 @@ DynamicList.prototype.attachObservers = function() { action: 'comment_save_edit' }); }) - .on('click', '.news-feed-comment-input-holder .cancel', function() { + .on('click keydown', '.news-feed-comment-input-holder .cancel', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + _this.$container.find('.fl-individual-comment').removeClass('editing'); _this.$container.find('.news-feed-comment-input-holder').removeClass('editing'); @@ -556,8 +597,12 @@ DynamicList.prototype.attachObservers = function() { $messageArea.val('').trigger('change'); autosize.update($messageArea); }) - .on('click', '.final .fl-comment-value', function(e) { - e.preventDefault(); + .on('click keydown', '.final .fl-comment-value', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + + event.preventDefault(); var _that = $(this); var commentId = $(this).parents('.fl-individual-comment').data('id'); var $parentContainer = $(this).parents('.fl-individual-comment'); @@ -654,7 +699,11 @@ DynamicList.prototype.attachObservers = function() { action: 'comment_options' }); }) - .on('click', '.dynamic-list-add-item', function() { + .on('click keydown', '.dynamic-list-add-item', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + if (!_this.data.addEntryLinkAction) { return; } @@ -686,7 +735,11 @@ DynamicList.prototype.attachObservers = function() { }); } }) - .on('click', '.dynamic-list-edit-item', function() { + .on('click keydown', '.dynamic-list-edit-item', function() { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + if (!_this.data.editEntryLinkAction) { return; } @@ -720,7 +773,11 @@ DynamicList.prototype.attachObservers = function() { }); } }) - .on('click', '.dynamic-list-delete-item', function() { + .on('click keydown', '.dynamic-list-delete-item', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + var _that = $(this); var entryID = $(this).parents('.news-feed-details-content-holder').data('entry-id'); var options = { @@ -780,13 +837,21 @@ DynamicList.prototype.attachObservers = function() { Fliplet.UI.Actions(options); }); }) - .on('click', '.toggle-bookmarks', function () { + .on('click keydown', '.toggle-bookmarks', function (event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + var $toggle = $(this); $toggle.toggleClass('mixitup-control-active'); _this.searchData(); }) - .on('click', '.news-feed-detail-overlay .news-feed-bookmark-wrapper', function() { + .on('click keydown', '.news-feed-detail-overlay .news-feed-bookmark-wrapper', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + var id = $(this).parents('.news-feed-details-content-holder').data('entry-id'); var record = _.find(_this.listItems, { id: id }); @@ -803,7 +868,11 @@ DynamicList.prototype.attachObservers = function() { $(this).parents('.news-feed-bookmark-holder').removeClass('not-bookmarked').addClass('bookmarked'); record.bookmarkButton.like(); }) - .on('click', '.news-feed-detail-overlay .news-feed-like-wrapper', function() { + .on('click keydown', '.news-feed-detail-overlay .news-feed-like-wrapper', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + var id = $(this).parents('.news-feed-details-content-holder').data('entry-id'); var record = _.find(_this.listItems, { id: id }); @@ -1796,8 +1865,8 @@ DynamicList.prototype.setupLikeButton = function(options) { name: Fliplet.Env.get('pageTitle') + '/' + title, likeLabel: '{{#if count}}{{count}}{{/if}}', likedLabel: '{{#if count}}{{count}}{{/if}}', - likeWrapper: '
    ', - likedWrapper: '
    ', + likeWrapper: '
    ', + likedWrapper: '
    ', addType: 'html', liked: record.liked, count: record.likeCount @@ -1811,6 +1880,7 @@ DynamicList.prototype.setupLikeButton = function(options) { }); btn.on('liked', function(data){ + debugger var count = btn.getCount() > 0 ? btn.getCount() : ''; record.liked = btn.isLiked(); @@ -1979,8 +2049,8 @@ DynamicList.prototype.setupBookmarkButton = function(options) { name: Fliplet.Env.get('pageTitle') + '/' + title, likeLabel: '', likedLabel: '', - likeWrapper: '
    ', - likedWrapper: '
    ', + likeWrapper: '
    ', + likedWrapper: '
    ', addType: 'html', getAllCounts: false, liked: record.bookmarked diff --git a/js/layout-javascript/simple-list-code.js b/js/layout-javascript/simple-list-code.js index 389499ea..97dd7808 100644 --- a/js/layout-javascript/simple-list-code.js +++ b/js/layout-javascript/simple-list-code.js @@ -186,10 +186,12 @@ DynamicList.prototype.attachObservers = function() { } }) .on('click keydown', '.simple-list-item', function(event) { - if (event.type !== 'click' && event.keyCode !== 32 && event.keyCode !== 13) { + if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { return; } + _this.$container.find('.simple-list-wrapper').hide(); + if ($(event.target).hasClass('simple-list-social-holder') || $(event.target).parents('.simple-list-social-holder').length) { return; } @@ -236,10 +238,12 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.simple-list-detail-overlay-close', function(event) { - if (event.type !== 'click' && event.keyCode !== 32 && event.keyCode !== 13) { + if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { return; } + _this.$container.find('.simple-list-wrapper').show(); + var result; if ($(this).hasClass('go-previous-screen')) { @@ -298,6 +302,7 @@ DynamicList.prototype.attachObservers = function() { $parentElement.find('.hidden-filter-controls').addClass('active'); $parentElement.find('.list-search-cancel').addClass('active'); $elementClicked.addClass('active'); + $parentElement.find('[data-filter-group]').show(); _this.calculateFiltersHeight($parentElement); @@ -420,7 +425,11 @@ DynamicList.prototype.attachObservers = function() { _this.isSearching = true; _this.searchData(value); }) - .on('click', '.clear-search', function() { + .on('click keydown', '.clear-search', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + _this.$container.find('.simple-list-container').removeClass('searching'); _this.isSearching = false; _this.searchData(''); @@ -431,8 +440,12 @@ DynamicList.prototype.attachObservers = function() { .on('hide.bs.collapse', '.simple-list-filters-panel .panel-collapse', function() { $(this).siblings('.panel-heading').find('.fa-angle-up').removeClass('fa-angle-up').addClass('fa-angle-down'); }) - .on('click', '.simple-list-comment-holder', function(e) { - e.stopPropagation(); + .on('click keydown', '.simple-list-comment-holder', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + + event.stopPropagation(); var identifier; if (_this.$container.find('.simple-list-container').hasClass('overlay-open')) { identifier = $(this).parents('.simple-list-details-holder').data('entry-id'); @@ -447,14 +460,22 @@ DynamicList.prototype.attachObservers = function() { action: 'comments_open' }); }) - .on('click', '.simple-list-comment-close-panel', function() { + .on('click keydown', '.simple-list-comment-close-panel', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + _this.$container.find('.simple-list-comment-panel').removeClass('open'); _this.$container.find('.simple-list-detail-overlay-content-holder').removeClass('lock'); if (!_this.$container.find('.simple-list-container').hasClass('overlay-open')) { $('body').removeClass('lock'); } }) - .on('click', '.simple-list-comment-input-holder .comment', function() { + .on('click keydown', '.simple-list-comment-input-holder .comment', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + var entryId = _this.entryClicked; var $commentArea = $(this).parents('.simple-list-comment-input-holder').find('[data-comment-body]'); var comment = $commentArea.val().trim(); @@ -540,7 +561,11 @@ DynamicList.prototype.attachObservers = function() { $messageArea.val('').trigger('change'); autosize.update($messageArea); }) - .on('click', '.final .fl-comment-value', function(e) { + .on('click keydown', '.final .fl-comment-value', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + e.preventDefault(); var _that = $(this); var commentId = $(this).parents('.fl-individual-comment').data('id'); @@ -638,7 +663,11 @@ DynamicList.prototype.attachObservers = function() { action: 'comment_options' }); }) - .on('click', '.dynamic-list-add-item', function() { + .on('click keydown', '.dynamic-list-add-item', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + debugger; if (!_this.data.addEntryLinkAction) { return; } @@ -670,7 +699,11 @@ DynamicList.prototype.attachObservers = function() { }); } }) - .on('click', '.dynamic-list-edit-item', function() { + .on('click keydown', '.dynamic-list-edit-item', function() { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + if (!_this.data.editEntryLinkAction) { return; } @@ -704,7 +737,11 @@ DynamicList.prototype.attachObservers = function() { }); } }) - .on('click', '.dynamic-list-delete-item', function() { + .on('click keydown', '.dynamic-list-delete-item', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + var _that = $(this); var entryID = $(this).parents('.simple-list-detail-overlay-content').find('.simple-list-detail-wrapper').data('entry-id'); var options = { @@ -764,7 +801,7 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.toggle-bookmarks', function (event) { - if (event.type !== 'click' && event.keyCode !== 32 && event.keyCode !== 13) { + if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { return; } @@ -773,7 +810,11 @@ DynamicList.prototype.attachObservers = function() { $toggle.toggleClass('mixitup-control-active'); _this.searchData(); }) - .on('click', '.simple-list-detail-overlay .simple-list-bookmark-wrapper', function() { + .on('click keydown', '.simple-list-detail-overlay .simple-list-bookmark-wrapper', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + var id = $(this).parents('.simple-list-details-holder').data('entry-id'); var record = _.find(_this.listItems, { id: id }); @@ -790,7 +831,11 @@ DynamicList.prototype.attachObservers = function() { $(this).parents('.simple-list-bookmark-holder').removeClass('not-bookmarked').addClass('bookmarked'); record.bookmarkButton.like(); }) - .on('click', '.simple-list-detail-overlay .simple-list-like-wrapper', function() { + .on('click keydown', '.simple-list-detail-overlay .simple-list-like-wrapper', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + var id = $(this).parents('.simple-list-details-holder').data('entry-id'); var record = _.find(_this.listItems, { id: id }); @@ -1589,8 +1634,8 @@ DynamicList.prototype.setupLikeButton = function(options) { name: Fliplet.Env.get('pageTitle') + '/' + title, likeLabel: '{{#if count}}{{count}}{{/if}}', likedLabel: '{{#if count}}{{count}}{{/if}}', - likeWrapper: '
    ', - likedWrapper: '
    ', + likeWrapper: '
    ', + likedWrapper: '
    ', addType: 'html', liked: record.liked, count: record.likeCount @@ -1771,8 +1816,8 @@ DynamicList.prototype.setupBookmarkButton = function(options) { name: Fliplet.Env.get('pageTitle') + '/' + title, likeLabel: '', likedLabel: '', - likeWrapper: '
    ', - likedWrapper: '
    ', + likeWrapper: '
    ', + likedWrapper: '
    ', addType: 'html', getAllCounts: false, liked: record.bookmarked diff --git a/js/layout-javascript/small-card-code.js b/js/layout-javascript/small-card-code.js index 47448505..47d267fe 100644 --- a/js/layout-javascript/small-card-code.js +++ b/js/layout-javascript/small-card-code.js @@ -233,7 +233,7 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.small-card-list-item', function(event) { - if (event.type !== 'click' && event.keyCode !== 32 && event.keyCode !== 13) { + if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { return; } @@ -243,6 +243,8 @@ DynamicList.prototype.attachObservers = function() { return; } + _this.$container.find('.small-card-list-wrapper').hide(); + var entryId = $(this).data('entry-id'); var entryTitle = $(this).find('.small-card-list-name').text().trim(); var beforeOpen = Promise.resolve(); @@ -294,10 +296,12 @@ DynamicList.prototype.attachObservers = function() { .on('click keydown', '.small-card-detail-overlay-close', function(event) { event.stopPropagation(); - if (event.type !== 'click' && event.keyCode !== 32 && event.keyCode !== 13) { + if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { return; } + _this.$container.find('.small-card-list-wrapper').show(); + var result; if ($(this).hasClass('go-previous-screen')) { @@ -369,6 +373,7 @@ DynamicList.prototype.attachObservers = function() { $parentElement.find('.hidden-filter-controls').addClass('active'); $parentElement.find('.list-search-cancel').addClass('active'); $elementClicked.addClass('active'); + $parentElement.find('[data-filter-group]').show(); _this.calculateFiltersHeight($parentElement); @@ -494,7 +499,11 @@ DynamicList.prototype.attachObservers = function() { _this.isSearching = true; _this.searchData(value); }) - .on('click', '.clear-search', function() { + .on('click keydown', '.clear-search', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + _this.$container.find('.new-small-card-list-container').removeClass('searching'); _this.isSearching = false; _this.searchData(''); @@ -505,7 +514,11 @@ DynamicList.prototype.attachObservers = function() { .on('hide.bs.collapse', '.small-card-filters-panel .panel-collapse', function() { $(this).siblings('.panel-heading').find('.fa-angle-up').removeClass('fa-angle-up').addClass('fa-angle-down'); }) - .on('click', '.dynamic-list-add-item', function() { + .on('click keydown', '.dynamic-list-add-item', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + if (!_this.data.addEntryLinkAction) { return; } @@ -537,7 +550,11 @@ DynamicList.prototype.attachObservers = function() { }); } }) - .on('click', '.dynamic-list-edit-item', function() { + .on('click keydown', '.dynamic-list-edit-item', function() { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + if (!_this.data.editEntryLinkAction) { return; } @@ -571,7 +588,11 @@ DynamicList.prototype.attachObservers = function() { }); } }) - .on('click', '.dynamic-list-delete-item', function() { + .on('click keydown', '.dynamic-list-delete-item', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + var _that = $(this); var entryID = $(this).parents('.small-card-detail-overlay').find('.small-card-list-detail-content-scroll-wrapper').data('entry-id'); var options = { @@ -637,8 +658,8 @@ DynamicList.prototype.attachObservers = function() { Fliplet.UI.Actions(options); }); }) - .on('click', '.toggle-bookmarks', function (event) { - if (event.type !== 'click' && event.keyCode !== 32 && event.keyCode !== 13) { + .on('click keydown', '.toggle-bookmarks', function (event) { + if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { return; } @@ -1466,8 +1487,8 @@ DynamicList.prototype.setupBookmarkButton = function(options) { name: Fliplet.Env.get('pageTitle') + '/' + title, likeLabel: '', likedLabel: '', - likeWrapper: '
    ', - likedWrapper: '
    ', + likeWrapper: '
    ', + likedWrapper: '
    ', addType: 'html', getAllCounts: false, liked: record.bookmarked diff --git a/js/layout-javascript/small-h-card-code.js b/js/layout-javascript/small-h-card-code.js index c3901f9d..3ce0af7f 100644 --- a/js/layout-javascript/small-h-card-code.js +++ b/js/layout-javascript/small-h-card-code.js @@ -104,10 +104,12 @@ DynamicList.prototype.attachObservers = function() { }, 100); }) .on('click keydown', '.small-h-card-list-item', function(event) { - if (event.type !== 'click' && event.keyCode !== 32 && event.keyCode !== 13) { + if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { return; } + _this.$container.find('.small-h-card-list-wrapper').hide(); + var _that = $(this); var entryId = $(this).data('entry-id'); var entryTitle = $(this).find('.small-h-card-list-item-text').text().trim(); @@ -160,10 +162,12 @@ DynamicList.prototype.attachObservers = function() { .on('click keydown', '.small-h-card-detail-overlay-close', function(event) { event.stopPropagation(); - if (event.type !== 'click' && event.keyCode !== 32 && event.keyCode !== 13) { + if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { return; } + _this.$container.find('.small-h-card-list-wrapper').show(); + var result; if ($(this).hasClass('go-previous-screen')) { @@ -209,7 +213,11 @@ DynamicList.prototype.attachObservers = function() { Fliplet.Page.Context.remove('dynamicListOpenId'); }) - .on('click', '.dynamic-list-add-item', function() { + .on('click keydown', '.dynamic-list-add-item', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + if (!_this.data.addEntryLinkAction) { return; } @@ -241,7 +249,11 @@ DynamicList.prototype.attachObservers = function() { }); } }) - .on('click', '.dynamic-list-edit-item', function() { + .on('click, keydown', '.dynamic-list-edit-item', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + if (!_this.data.editEntryLinkAction) { return; } @@ -275,7 +287,11 @@ DynamicList.prototype.attachObservers = function() { }); } }) - .on('click', '.dynamic-list-delete-item', function() { + .on('click keydown', '.dynamic-list-delete-item', function(event) { + if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + return; + } + var _that = $(this); var entryID = $(this).parents('.small-h-card-detail-overlay').find('.small-h-card-list-detail-content-scroll-wrapper').data('entry-id'); var options = { diff --git a/templates/build/agenda-base.build.hbs b/templates/build/agenda-base.build.hbs index 6eb4a174..62fbc0e1 100644 --- a/templates/build/agenda-base.build.hbs +++ b/templates/build/agenda-base.build.hbs @@ -35,7 +35,7 @@ \{{#if searchEnabled}}
    - +
    Search
    @@ -43,14 +43,14 @@ \{{#ifCond filtersEnabled '||' bookmarksEnabled}}
    \{{#ifCond bookmarksEnabled '&&' hasTopBar}} -
    +
    \{{/ifCond}} -
    +
    \{{#if filtersEnabled}} - + \{{/if}}
    \{{/ifCond}} @@ -99,7 +99,7 @@ @@ -130,7 +130,7 @@
    -
    +
    close icon
    @@ -139,14 +139,14 @@
    -
    +
    close icon
    \{{#if showAddEntry}} -
    +
    \{{/if}} \ No newline at end of file diff --git a/templates/build/agenda-cards-detail.build.hbs b/templates/build/agenda-cards-detail.build.hbs index 2bf1b52e..f559d023 100644 --- a/templates/build/agenda-cards-detail.build.hbs +++ b/templates/build/agenda-cards-detail.build.hbs @@ -12,27 +12,27 @@
    -
    +
    Bookmark
    -
    +
    Bookmarked
    \{{#if pollButton}} -
    +
    Poll
    \{{/if}} \{{#if surveyButton}} -
    +
    Survey
    \{{/if}} \{{#if questionsButton}} -
    +
    Questions
    \{{/if}} @@ -94,7 +94,7 @@ \{{/if}} \{{/if}} \{{/ifCond}} @@ -107,7 +107,7 @@ \{{/if}} \{{/if}} \{{/ifCond}} @@ -120,7 +120,7 @@ \{{/if}} \{{/if}} \{{/ifCond}} @@ -141,10 +141,10 @@ \{{#ifCond editEntry '||' deleteEntry}}
    \{{#if editEntry}} -
    Edit
    +
    Edit
    \{{/if}} \{{#if deleteEntry}} -
    Delete
    +
    Delete
    \{{/if}}
    \{{/ifCond}} diff --git a/templates/build/agenda-cards-loop.build.hbs b/templates/build/agenda-cards-loop.build.hbs index 8d3c2b79..8fa3b8d1 100644 --- a/templates/build/agenda-cards-loop.build.hbs +++ b/templates/build/agenda-cards-loop.build.hbs @@ -1,8 +1,8 @@ \{{#each this}} -
    +
    \{{#each this}} -
    +
    diff --git a/templates/build/agenda-cards-search-results.build.hbs b/templates/build/agenda-cards-search-results.build.hbs index 9bbabef8..bed03db0 100644 --- a/templates/build/agenda-cards-search-results.build.hbs +++ b/templates/build/agenda-cards-search-results.build.hbs @@ -7,7 +7,7 @@

    \{{moment this.0.[Full Date] format="ddd D MMM"}}

    \{{#each this}} -
    +
    diff --git a/templates/build/agenda-dates-loop.build.hbs b/templates/build/agenda-dates-loop.build.hbs index 68f8055c..249ee038 100644 --- a/templates/build/agenda-dates-loop.build.hbs +++ b/templates/build/agenda-dates-loop.build.hbs @@ -1,5 +1,5 @@ \{{#each this}} -
  • +
  • \{{week}}
    \{{day}}
    \{{month}}
    diff --git a/templates/build/agenda-filters.build.hbs b/templates/build/agenda-filters.build.hbs index cfe27f62..b8d56b60 100644 --- a/templates/build/agenda-filters.build.hbs +++ b/templates/build/agenda-filters.build.hbs @@ -14,7 +14,7 @@
    @@ -29,7 +29,7 @@
    diff --git a/templates/build/news-feed-base.build.hbs b/templates/build/news-feed-base.build.hbs index d267ea12..9396e27c 100644 --- a/templates/build/news-feed-base.build.hbs +++ b/templates/build/news-feed-base.build.hbs @@ -40,7 +40,7 @@ \{{#if searchEnabled}}
    - +
    Search
    @@ -48,14 +48,14 @@ \{{#ifCond filtersEnabled '||' bookmarksEnabled}}
    \{{#if bookmarksEnabled}} -
    +
    \{{/if}} -
    +
    \{{#if filtersEnabled}} - + \{{/if}}
    \{{/ifCond}} @@ -69,7 +69,7 @@ @@ -124,7 +124,7 @@
    -
    +
    close icon
    @@ -133,14 +133,14 @@
    -
    +
    close icon
    \{{#if showAddEntry}} -
    +
    \{{/if}} @@ -148,7 +148,7 @@
    Comments
    -
    +
    You are offline
    @@ -162,12 +162,12 @@
    - +
    -
    Comment
    - -
    Save
    +
    Comment
    + +
    Save
    diff --git a/templates/build/news-feed-comment.build.hbs b/templates/build/news-feed-comment.build.hbs index 1bd964d8..369c814a 100644 --- a/templates/build/news-feed-comment.build.hbs +++ b/templates/build/news-feed-comment.build.hbs @@ -7,7 +7,7 @@
    \{{ userName }}\{{ literalDate }}
    -
    \{{ formatComment text }}
    +
    \{{ formatComment text }}
  • diff --git a/templates/build/news-feed-detail.build.hbs b/templates/build/news-feed-detail.build.hbs index 926a9fb7..f222f012 100644 --- a/templates/build/news-feed-detail.build.hbs +++ b/templates/build/news-feed-detail.build.hbs @@ -12,10 +12,10 @@ \{{/ifCond}} \{{#if likesEnabled}}
    -
    +
    -
    +
    @@ -23,17 +23,17 @@ \{{#if bookmarksEnabled}}
    -
    +
    -
    +
    \{{/if}} \{{#if commentsEnabled}} -
    +
    @@ -104,7 +104,7 @@ \{{/if}} \{{/if}} \{{/ifCond}} @@ -117,7 +117,7 @@ \{{/if}} \{{/if}} \{{/ifCond}} @@ -130,7 +130,7 @@ \{{/if}} \{{/if}} \{{/ifCond}} @@ -151,10 +151,10 @@ \{{#ifCond editEntry '||' deleteEntry}}
    \{{#if editEntry}} -
    Edit
    +
    Edit
    \{{/if}} \{{#if deleteEntry}} -
    Delete
    +
    Delete
    \{{/if}}
    \{{/ifCond}} diff --git a/templates/build/news-feed-filters.build.hbs b/templates/build/news-feed-filters.build.hbs index 14057ceb..6c612e85 100644 --- a/templates/build/news-feed-filters.build.hbs +++ b/templates/build/news-feed-filters.build.hbs @@ -14,7 +14,7 @@
    @@ -29,7 +29,7 @@
    diff --git a/templates/build/news-feed-loop.build.hbs b/templates/build/news-feed-loop.build.hbs index 41a3fedc..c8988ae3 100644 --- a/templates/build/news-feed-loop.build.hbs +++ b/templates/build/news-feed-loop.build.hbs @@ -1,5 +1,5 @@ \{{#each this}} -
    +
    \{{#if [Image]}}
    @@ -31,7 +31,7 @@ \{{/if}} \{{#if commentsEnabled}} -
    +
    diff --git a/templates/build/news-feed-single-comment.build.hbs b/templates/build/news-feed-single-comment.build.hbs index 8c2a42ca..99c7a88e 100644 --- a/templates/build/news-feed-single-comment.build.hbs +++ b/templates/build/news-feed-single-comment.build.hbs @@ -6,7 +6,7 @@
    \{{ userName }}\{{ literalDate }}
    -
    \{{ formatComment text }}
    +
    \{{ formatComment text }}
    \ No newline at end of file diff --git a/templates/build/simple-list-base.build.hbs b/templates/build/simple-list-base.build.hbs index 0a5c51f6..d6b9f532 100644 --- a/templates/build/simple-list-base.build.hbs +++ b/templates/build/simple-list-base.build.hbs @@ -40,7 +40,7 @@ \{{#if searchEnabled}}
    - +
    Search
    @@ -48,14 +48,14 @@ \{{#ifCond filtersEnabled '||' bookmarksEnabled}}
    \{{#if bookmarksEnabled}} -
    +
    \{{/if}} -
    +
    \{{#if filtersEnabled}} - + \{{/if}}
    \{{/ifCond}} @@ -69,7 +69,7 @@ @@ -125,7 +125,7 @@
    -
    +
    close icon
    @@ -135,14 +135,14 @@
    -
    +
    close icon
    \{{#if showAddEntry}} -
    +
    \{{/if}} @@ -150,7 +150,7 @@
    Comments
    -
    +
    You are offline
    @@ -164,12 +164,12 @@
    - +
    -
    Comment
    - -
    Save
    +
    Comment
    + +
    Save
    diff --git a/templates/build/simple-list-comment.build.hbs b/templates/build/simple-list-comment.build.hbs index 1bd964d8..369c814a 100644 --- a/templates/build/simple-list-comment.build.hbs +++ b/templates/build/simple-list-comment.build.hbs @@ -7,7 +7,7 @@
    \{{ userName }}\{{ literalDate }}
    -
    \{{ formatComment text }}
    +
    \{{ formatComment text }}
    diff --git a/templates/build/simple-list-detail.build.hbs b/templates/build/simple-list-detail.build.hbs index 9a634984..b5617406 100644 --- a/templates/build/simple-list-detail.build.hbs +++ b/templates/build/simple-list-detail.build.hbs @@ -54,7 +54,7 @@ \{{/if}} \{{/if}} \{{/ifCond}} @@ -67,7 +67,7 @@ \{{/if}} \{{/if}} \{{/ifCond}} @@ -80,7 +80,7 @@ \{{/if}} \{{/if}} \{{/ifCond}} @@ -102,20 +102,20 @@ \{{#ifCond editEntry '||' deleteEntry}}
    \{{#if editEntry}} -
    Edit
    +
    Edit
    \{{/if}} \{{#if deleteEntry}} -
    Delete
    +
    Delete
    \{{/if}}
    \{{/ifCond}}
    \{{#if likesEnabled}}
    -
    +
    -
    +
    @@ -123,17 +123,17 @@ \{{#if bookmarksEnabled}}
    -
    +
    -
    +
    \{{/if}} \{{#if commentsEnabled}} -
    +
    diff --git a/templates/build/simple-list-filters.build.hbs b/templates/build/simple-list-filters.build.hbs index 7627d8e7..c2883fcd 100644 --- a/templates/build/simple-list-filters.build.hbs +++ b/templates/build/simple-list-filters.build.hbs @@ -14,7 +14,7 @@
    @@ -30,7 +30,7 @@
    diff --git a/templates/build/simple-list-loop.build.hbs b/templates/build/simple-list-loop.build.hbs index e6c234cc..8c6b6548 100644 --- a/templates/build/simple-list-loop.build.hbs +++ b/templates/build/simple-list-loop.build.hbs @@ -1,5 +1,5 @@ \{{#each this}} -
    +
    \{{#if [Image]}}
    \{{/if}} @@ -29,7 +29,7 @@
    \{{/if}} \{{#if commentsEnabled}} -
    +
    diff --git a/templates/build/simple-list-single-comment.build.hbs b/templates/build/simple-list-single-comment.build.hbs index 8c2a42ca..99c7a88e 100644 --- a/templates/build/simple-list-single-comment.build.hbs +++ b/templates/build/simple-list-single-comment.build.hbs @@ -6,7 +6,7 @@
    \{{ userName }}\{{ literalDate }}
    -
    \{{ formatComment text }}
    +
    \{{ formatComment text }}
    \ No newline at end of file diff --git a/templates/build/small-card-base.build.hbs b/templates/build/small-card-base.build.hbs index 983a49cd..2b3a91f7 100644 --- a/templates/build/small-card-base.build.hbs +++ b/templates/build/small-card-base.build.hbs @@ -45,21 +45,21 @@ \{{#if searchEnabled}}
    - +
    Search
    \{{/if}}
    \{{#if bookmarksEnabled}} -
    +
    \{{/if}} -
    +
    \{{#if filtersEnabled}} - + \{{/if}}
    @@ -72,7 +72,7 @@ @@ -127,7 +127,7 @@
    -
    +
    close icon
    @@ -136,14 +136,14 @@
    -
    +
    close icon
    \{{#if showAddEntry}} -
    +
    \{{/if}} diff --git a/templates/build/small-card-detail.build.hbs b/templates/build/small-card-detail.build.hbs index a340842e..aebbe801 100644 --- a/templates/build/small-card-detail.build.hbs +++ b/templates/build/small-card-detail.build.hbs @@ -7,11 +7,11 @@
    \{{#if bookmarksEnabled}} -
    -
    +
    +
    -
    +
    @@ -24,7 +24,7 @@
    \{{#if [Email]}}
    - +
    EMAIL
    @@ -32,7 +32,7 @@ \{{/if}} \{{#if [Telephone]}}
    - +
    CALL
    @@ -40,7 +40,7 @@ \{{/if}} \{{#if [Linkedin]}}
    - +
    LINKEDIN
    @@ -104,7 +104,7 @@ \{{/if}} \{{/if}} \{{/ifCond}} @@ -117,7 +117,7 @@ \{{/if}} \{{/if}} \{{/ifCond}} @@ -130,7 +130,7 @@ \{{/if}} \{{/if}} \{{/ifCond}} @@ -152,10 +152,10 @@ \{{#ifCond editEntry '||' deleteEntry}}
    \{{#if editEntry}} -
    Edit
    +
    Edit
    \{{/if}} \{{#if deleteEntry}} -
    Delete
    +
    Delete
    \{{/if}}
    \{{/ifCond}} diff --git a/templates/build/small-card-filters.build.hbs b/templates/build/small-card-filters.build.hbs index 8ca83b14..c761cada 100644 --- a/templates/build/small-card-filters.build.hbs +++ b/templates/build/small-card-filters.build.hbs @@ -14,7 +14,7 @@
    @@ -29,7 +29,7 @@
    diff --git a/templates/build/small-card-loop.build.hbs b/templates/build/small-card-loop.build.hbs index 271411ef..83748017 100644 --- a/templates/build/small-card-loop.build.hbs +++ b/templates/build/small-card-loop.build.hbs @@ -1,5 +1,5 @@ \{{#each this}} -
    +
    \{{#if [Image]}} diff --git a/templates/build/small-h-card-base.build.hbs b/templates/build/small-h-card-base.build.hbs index 825d0ec2..1e12fafd 100644 --- a/templates/build/small-h-card-base.build.hbs +++ b/templates/build/small-h-card-base.build.hbs @@ -12,7 +12,7 @@
    -
    +
    close icon
    @@ -21,14 +21,14 @@
    -
    +
    close icon
    \{{#if showAddEntry}} -
    +
    \{{/if}} \ No newline at end of file diff --git a/templates/build/small-h-card-detail.build.hbs b/templates/build/small-h-card-detail.build.hbs index d0cef015..cb4b7d47 100644 --- a/templates/build/small-h-card-detail.build.hbs +++ b/templates/build/small-h-card-detail.build.hbs @@ -12,7 +12,7 @@
    \{{#if [Email]}}
    - +
    EMAIL
    @@ -20,7 +20,7 @@ \{{/if}} \{{#if [Telephone]}}
    - +
    CALL
    @@ -28,7 +28,7 @@ \{{/if}} \{{#if [Linkedin]}}
    - +
    LINKEDIN
    @@ -92,7 +92,7 @@ \{{/if}} \{{/if}} \{{/ifCond}} @@ -105,7 +105,7 @@ \{{/if}} \{{/if}} \{{/ifCond}} @@ -118,7 +118,7 @@ \{{/if}} \{{/if}} \{{/ifCond}} @@ -140,10 +140,10 @@ \{{#ifCond editEntry '||' deleteEntry}}
    \{{#if editEntry}} -
    Edit
    +
    Edit
    \{{/if}} \{{#if deleteEntry}} -
    Delete
    +
    Delete
    \{{/if}}
    \{{/ifCond}} diff --git a/templates/build/small-h-card-loop.build.hbs b/templates/build/small-h-card-loop.build.hbs index 0b970c9f..a81e3592 100644 --- a/templates/build/small-h-card-loop.build.hbs +++ b/templates/build/small-h-card-loop.build.hbs @@ -1,5 +1,5 @@ \{{#each this}} -
    +
    From abaf7de1c8277e3c7c968da9be70aed9caa47149 Mon Sep 17 00:00:00 2001 From: Yaroslav Ovdii Date: Mon, 17 Aug 2020 09:56:55 +0300 Subject: [PATCH 2/3] added new utils function to manage event keydown --- js/layout-javascript/agenda-code.js | 24 +++++++++--------- js/layout-javascript/news-feed-code.js | 31 +++++++++++------------ js/layout-javascript/simple-list-code.js | 22 ++++++++-------- js/layout-javascript/small-card-code.js | 10 ++++---- js/layout-javascript/small-h-card-code.js | 8 +++--- js/utils.js | 11 ++++++++ 6 files changed, 58 insertions(+), 48 deletions(-) diff --git a/js/layout-javascript/agenda-code.js b/js/layout-javascript/agenda-code.js index 62755254..dac0d408 100644 --- a/js/layout-javascript/agenda-code.js +++ b/js/layout-javascript/agenda-code.js @@ -195,7 +195,7 @@ DynamicList.prototype.attachObservers = function() { _this.clearFilters(); }) .on('click keydown', '.hidden-filter-controls-filter', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -285,7 +285,7 @@ DynamicList.prototype.attachObservers = function() { _this.$container.find('.clear-filters').removeClass('hidden'); }) .on('click keydown', '.list-search-cancel', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -364,7 +364,7 @@ DynamicList.prototype.attachObservers = function() { _this.searchData(value); }) .on('click keydown', '.clear-search', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -373,7 +373,7 @@ DynamicList.prototype.attachObservers = function() { _this.searchData(''); }) .on('click keydown', '.go-to-poll', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -392,7 +392,7 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.go-to-survey', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -411,7 +411,7 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.go-to-questions', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -456,7 +456,7 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.toggle-agenda, .toggle-bookmarks', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -612,7 +612,7 @@ DynamicList.prototype.attachObservers = function() { } }) .on('click keydown', '.agenda-date-selector li', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -645,7 +645,7 @@ DynamicList.prototype.attachObservers = function() { } }) .on('click keydown', '.dynamic-list-add-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -681,7 +681,7 @@ DynamicList.prototype.attachObservers = function() { } }) .on('click keydown', '.dynamic-list-edit-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -719,7 +719,7 @@ DynamicList.prototype.attachObservers = function() { } }) .on('click keydown', '.dynamic-list-delete-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -785,7 +785,7 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.agenda-detail-overlay .bookmark-wrapper, .search-results-wrapper .bookmark-wrapper', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } diff --git a/js/layout-javascript/news-feed-code.js b/js/layout-javascript/news-feed-code.js index 70617624..fbea7719 100644 --- a/js/layout-javascript/news-feed-code.js +++ b/js/layout-javascript/news-feed-code.js @@ -171,7 +171,7 @@ DynamicList.prototype.attachObservers = function() { _this.clearFilters(); }) .on('click keydown', '.hidden-filter-controls-filter', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -208,7 +208,7 @@ DynamicList.prototype.attachObservers = function() { }, 100); }) .on('click keydown', '.news-feed-list-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -451,7 +451,7 @@ DynamicList.prototype.attachObservers = function() { _this.searchData(value); }) .on('click keydown', '.clear-search', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -466,7 +466,7 @@ DynamicList.prototype.attachObservers = function() { $(this).siblings('.panel-heading').find('.fa-angle-up').removeClass('fa-angle-up').addClass('fa-angle-down'); }) .on('click keydown', '.news-feed-comment-holder', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -488,7 +488,7 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.news-feed-comment-close-panel', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -500,7 +500,7 @@ DynamicList.prototype.attachObservers = function() { } }) .on('click keydown', '.news-feed-comment-input-holder .comment', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -562,7 +562,7 @@ DynamicList.prototype.attachObservers = function() { } }) .on('click keydown', '.news-feed-comment-input-holder .save', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -586,7 +586,7 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.news-feed-comment-input-holder .cancel', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -598,7 +598,7 @@ DynamicList.prototype.attachObservers = function() { autosize.update($messageArea); }) .on('click keydown', '.final .fl-comment-value', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -700,7 +700,7 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.dynamic-list-add-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -736,7 +736,7 @@ DynamicList.prototype.attachObservers = function() { } }) .on('click keydown', '.dynamic-list-edit-item', function() { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -774,7 +774,7 @@ DynamicList.prototype.attachObservers = function() { } }) .on('click keydown', '.dynamic-list-delete-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -838,7 +838,7 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.toggle-bookmarks', function (event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -848,7 +848,7 @@ DynamicList.prototype.attachObservers = function() { _this.searchData(); }) .on('click keydown', '.news-feed-detail-overlay .news-feed-bookmark-wrapper', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -869,7 +869,7 @@ DynamicList.prototype.attachObservers = function() { record.bookmarkButton.like(); }) .on('click keydown', '.news-feed-detail-overlay .news-feed-like-wrapper', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -1880,7 +1880,6 @@ DynamicList.prototype.setupLikeButton = function(options) { }); btn.on('liked', function(data){ - debugger var count = btn.getCount() > 0 ? btn.getCount() : ''; record.liked = btn.isLiked(); diff --git a/js/layout-javascript/simple-list-code.js b/js/layout-javascript/simple-list-code.js index 97dd7808..c6ab3439 100644 --- a/js/layout-javascript/simple-list-code.js +++ b/js/layout-javascript/simple-list-code.js @@ -426,7 +426,7 @@ DynamicList.prototype.attachObservers = function() { _this.searchData(value); }) .on('click keydown', '.clear-search', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -441,7 +441,7 @@ DynamicList.prototype.attachObservers = function() { $(this).siblings('.panel-heading').find('.fa-angle-up').removeClass('fa-angle-up').addClass('fa-angle-down'); }) .on('click keydown', '.simple-list-comment-holder', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -461,7 +461,7 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.simple-list-comment-close-panel', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -472,7 +472,7 @@ DynamicList.prototype.attachObservers = function() { } }) .on('click keydown', '.simple-list-comment-input-holder .comment', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -562,7 +562,7 @@ DynamicList.prototype.attachObservers = function() { autosize.update($messageArea); }) .on('click keydown', '.final .fl-comment-value', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -664,10 +664,10 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.dynamic-list-add-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } - debugger; + if (!_this.data.addEntryLinkAction) { return; } @@ -700,7 +700,7 @@ DynamicList.prototype.attachObservers = function() { } }) .on('click keydown', '.dynamic-list-edit-item', function() { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -738,7 +738,7 @@ DynamicList.prototype.attachObservers = function() { } }) .on('click keydown', '.dynamic-list-delete-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -811,7 +811,7 @@ DynamicList.prototype.attachObservers = function() { _this.searchData(); }) .on('click keydown', '.simple-list-detail-overlay .simple-list-bookmark-wrapper', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -832,7 +832,7 @@ DynamicList.prototype.attachObservers = function() { record.bookmarkButton.like(); }) .on('click keydown', '.simple-list-detail-overlay .simple-list-like-wrapper', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } diff --git a/js/layout-javascript/small-card-code.js b/js/layout-javascript/small-card-code.js index 47d267fe..c92ffa53 100644 --- a/js/layout-javascript/small-card-code.js +++ b/js/layout-javascript/small-card-code.js @@ -500,7 +500,7 @@ DynamicList.prototype.attachObservers = function() { _this.searchData(value); }) .on('click keydown', '.clear-search', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -515,7 +515,7 @@ DynamicList.prototype.attachObservers = function() { $(this).siblings('.panel-heading').find('.fa-angle-up').removeClass('fa-angle-up').addClass('fa-angle-down'); }) .on('click keydown', '.dynamic-list-add-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -550,8 +550,8 @@ DynamicList.prototype.attachObservers = function() { }); } }) - .on('click keydown', '.dynamic-list-edit-item', function() { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + .on('click keydown', '.dynamic-list-edit-item', function(event) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -589,7 +589,7 @@ DynamicList.prototype.attachObservers = function() { } }) .on('click keydown', '.dynamic-list-delete-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } diff --git a/js/layout-javascript/small-h-card-code.js b/js/layout-javascript/small-h-card-code.js index 3ce0af7f..f0c0829b 100644 --- a/js/layout-javascript/small-h-card-code.js +++ b/js/layout-javascript/small-h-card-code.js @@ -214,7 +214,7 @@ DynamicList.prototype.attachObservers = function() { Fliplet.Page.Context.remove('dynamicListOpenId'); }) .on('click keydown', '.dynamic-list-add-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -249,8 +249,8 @@ DynamicList.prototype.attachObservers = function() { }); } }) - .on('click, keydown', '.dynamic-list-edit-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + .on('click keydown', '.dynamic-list-edit-item', function(event) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -288,7 +288,7 @@ DynamicList.prototype.attachObservers = function() { } }) .on('click keydown', '.dynamic-list-delete-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 13 && event.keyCode !== 32) { + if (!_this.Utils.Event.isExecute(event)) { return; } diff --git a/js/utils.js b/js/utils.js index 6cb88b1f..2437df10 100644 --- a/js/utils.js +++ b/js/utils.js @@ -165,6 +165,14 @@ Fliplet.Registry.set('dynamicListUtils', (function () { }); } + function isExecute (event) { + if (event.type === 'click') { + return true; + } + + return event.type === 'keydown' && (event.keyCode === 13 || event.keyCode === 32) + } + function validateImageUrl(url) { if (_.isArray(url)) { return _.map(url, function (val) { @@ -1340,6 +1348,9 @@ Fliplet.Registry.set('dynamicListUtils', (function () { prepareData: prepareRecordsData, addComputedFields: addRecordsComputedFields }, + Event: { + isExecute: isExecute + }, User: { isAdmin: userIsAdmin, canAddRecord: userCanAddRecord From d9aefc5e803315b3d32c93d354f4f0ff02b27f2b Mon Sep 17 00:00:00 2001 From: Yaroslav Ovdii Date: Mon, 17 Aug 2020 16:28:49 +0300 Subject: [PATCH 3/3] changed keydown handler --- js/layout-javascript/agenda-code.js | 2 +- js/layout-javascript/simple-list-code.js | 6 +++--- js/layout-javascript/small-card-code.js | 6 +++--- js/layout-javascript/small-h-card-code.js | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/js/layout-javascript/agenda-code.js b/js/layout-javascript/agenda-code.js index dac0d408..6cc302ff 100644 --- a/js/layout-javascript/agenda-code.js +++ b/js/layout-javascript/agenda-code.js @@ -491,7 +491,7 @@ DynamicList.prototype.attachObservers = function() { }, 100); }) .on('click keydown', '.agenda-list-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { + if (!_this.Utils.Event.isExecute(event)) { return; } diff --git a/js/layout-javascript/simple-list-code.js b/js/layout-javascript/simple-list-code.js index c6ab3439..dd5b1611 100644 --- a/js/layout-javascript/simple-list-code.js +++ b/js/layout-javascript/simple-list-code.js @@ -186,7 +186,7 @@ DynamicList.prototype.attachObservers = function() { } }) .on('click keydown', '.simple-list-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -238,7 +238,7 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.simple-list-detail-overlay-close', function(event) { - if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -801,7 +801,7 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.toggle-bookmarks', function (event) { - if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { + if (!_this.Utils.Event.isExecute(event)) { return; } diff --git a/js/layout-javascript/small-card-code.js b/js/layout-javascript/small-card-code.js index c92ffa53..2881c7b4 100644 --- a/js/layout-javascript/small-card-code.js +++ b/js/layout-javascript/small-card-code.js @@ -233,7 +233,7 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.small-card-list-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -296,7 +296,7 @@ DynamicList.prototype.attachObservers = function() { .on('click keydown', '.small-card-detail-overlay-close', function(event) { event.stopPropagation(); - if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -659,7 +659,7 @@ DynamicList.prototype.attachObservers = function() { }); }) .on('click keydown', '.toggle-bookmarks', function (event) { - if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { + if (!_this.Utils.Event.isExecute(event)) { return; } diff --git a/js/layout-javascript/small-h-card-code.js b/js/layout-javascript/small-h-card-code.js index f0c0829b..32770753 100644 --- a/js/layout-javascript/small-h-card-code.js +++ b/js/layout-javascript/small-h-card-code.js @@ -104,7 +104,7 @@ DynamicList.prototype.attachObservers = function() { }, 100); }) .on('click keydown', '.small-h-card-list-item', function(event) { - if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { + if (!_this.Utils.Event.isExecute(event)) { return; } @@ -162,7 +162,7 @@ DynamicList.prototype.attachObservers = function() { .on('click keydown', '.small-h-card-detail-overlay-close', function(event) { event.stopPropagation(); - if (event.type === 'keydown' && event.keyCode !== 32 && event.keyCode !== 13) { + if (!_this.Utils.Event.isExecute(event)) { return; }