card 1.98.0 → 1.98.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/db/migrate_core_cards/20190718140126_add_guides.rb +19 -0
- data/db/migrate_core_cards/data/cards/Xaccount_setting-Xright-Xstructure +9 -2
- data/db/migrate_core_cards/data/cards/anyone_signed_in-dashboard +0 -2
- data/db/seed/new/card_actions.yml +858 -842
- data/db/seed/new/card_acts.yml +2 -2
- data/db/seed/new/card_references.yml +965 -951
- data/db/seed/new/cards.yml +3351 -3310
- data/db/seed/new/schema_migrations_core_cards.yml +4 -0
- data/db/seed/test/fixtures/card_actions.yml +1861 -1845
- data/db/seed/test/fixtures/card_acts.yml +489 -489
- data/db/seed/test/fixtures/card_changes.yml +66 -66
- data/db/seed/test/fixtures/card_references.yml +922 -908
- data/db/seed/test/fixtures/cards.yml +3100 -3059
- data/db/seed/test/fixtures/schema_migrations_core_cards.yml +4 -0
- data/lib/card/act_manager.rb +15 -45
- data/lib/card/act_manager/event_delay.rb +48 -0
- data/lib/card/act_manager/stage_director.rb +2 -2
- data/lib/card/act_manager/stage_director/phases.rb +3 -6
- data/lib/card/auth/current.rb +5 -0
- data/lib/card/set/event/delayed_event.rb +2 -0
- data/mod/account/set/right/account.rb +10 -14
- data/mod/account/set/right/token.rb +1 -0
- data/mod/account/set/type/signup.rb +2 -4
- data/mod/account/spec/set/right/account_spec.rb +1 -2
- data/mod/account/spec/set/type/signup_spec.rb +2 -1
- data/mod/bootstrap/lib/stylesheets/style_bootstrap_cards.scss +1 -6
- data/mod/core/set/all/event_conditions.rb +16 -5
- data/mod/core/set/all/fetch_helper.rb +4 -1
- data/mod/core/set/all/name_events.rb +3 -2
- data/mod/core/set/all/references.rb +3 -3
- data/mod/core/set/all/rename.rb +3 -2
- data/mod/core/set/all/update_read_rules.rb +1 -19
- data/mod/core/spec/set/all/event_conditions_spec.rb +36 -38
- data/mod/core/spec/set/all/permissions_spec.rb +1 -1
- data/mod/date/set/all/calendar.rb +1 -1
- data/mod/date/vendor/moment/CHANGELOG.md +8 -0
- data/mod/date/vendor/moment/Moment.js.nuspec +5 -5
- data/mod/date/vendor/moment/component.json +1 -1
- data/mod/date/vendor/moment/locale/az.js +1 -1
- data/mod/date/vendor/moment/locale/be.js +1 -1
- data/mod/date/vendor/moment/locale/pa-in.js +1 -1
- data/mod/date/vendor/moment/meteor/package.js +1 -1
- data/mod/date/vendor/moment/min/locales.js +28 -28
- data/mod/date/vendor/moment/min/locales.min.js +1 -1
- data/mod/date/vendor/moment/min/moment-with-locales.js +33 -33
- data/mod/date/vendor/moment/min/moment-with-locales.min.js +1 -1
- data/mod/date/vendor/moment/min/moment.min.js +1 -1
- data/mod/date/vendor/moment/min/tests.js +48 -11
- data/mod/date/vendor/moment/moment.js +5 -5
- data/mod/date/vendor/moment/package.json +2 -2
- data/mod/date/vendor/moment/src/lib/create/from-string.js +1 -1
- data/mod/date/vendor/moment/src/lib/units/day-of-week.js +3 -3
- data/mod/date/vendor/moment/src/locale/az.js +1 -1
- data/mod/date/vendor/moment/src/locale/be.js +1 -1
- data/mod/date/vendor/moment/src/locale/pa-in.js +1 -1
- data/mod/date/vendor/moment/src/moment.js +2 -2
- data/mod/date/vendor/moment/src/test/locale/az.js +5 -5
- data/mod/date/vendor/moment/src/test/locale/be.js +3 -0
- data/mod/date/vendor/moment/src/test/locale/pa-in.js +3 -3
- data/mod/date/vendor/moment/src/test/moment/locale.js +33 -0
- data/mod/date/vendor/moment/src/test/moment/start_end_of.js +1 -1
- data/mod/date/vendor/moment/src/test/moment/weeks.js +2 -2
- data/mod/date/vendor/tempusdominus/Gruntfile.js +7 -49
- data/mod/date/vendor/tempusdominus/build/css/tempusdominus-bootstrap-4.css +3 -1
- data/mod/date/vendor/tempusdominus/build/css/tempusdominus-bootstrap-4.min.css +3 -1
- data/mod/date/vendor/tempusdominus/build/js/tempusdominus-bootstrap-4.js +128 -116
- data/mod/date/vendor/tempusdominus/build/js/tempusdominus-bootstrap-4.min.js +3 -3
- data/mod/date/vendor/tempusdominus/composer.json +3 -3
- data/mod/date/vendor/tempusdominus/docs/Changelog/index.html +20 -36
- data/mod/date/vendor/tempusdominus/docs/ContributorsGuide/index.html +20 -36
- data/mod/date/vendor/tempusdominus/docs/Events/index.html +20 -36
- data/mod/date/vendor/tempusdominus/docs/Extras/index.html +20 -36
- data/mod/date/vendor/tempusdominus/docs/FAQ/index.html +20 -36
- data/mod/date/vendor/tempusdominus/docs/Functions/index.html +20 -36
- data/mod/date/vendor/tempusdominus/docs/Installing/index.html +30 -50
- data/mod/date/vendor/tempusdominus/docs/Options/index.html +21 -37
- data/mod/date/vendor/tempusdominus/docs/Usage/index.html +20 -40
- data/mod/date/vendor/tempusdominus/docs/css/base.css +1682 -0
- data/mod/date/vendor/tempusdominus/docs/css/tempusdominus-bootstrap-4.css +3 -1
- data/mod/date/vendor/tempusdominus/docs/index.html +26 -41
- data/mod/date/vendor/tempusdominus/docs/js/tempusdominus-bootstrap-4.js +127 -115
- data/mod/date/vendor/tempusdominus/docs/search/search_index.json +11 -16
- data/mod/date/vendor/tempusdominus/docs/sitemap.xml +10 -10
- data/mod/date/vendor/tempusdominus/docs/theme/base.html +11 -12
- data/mod/date/vendor/tempusdominus/docs/theme/css/base.css +1682 -0
- data/mod/date/vendor/tempusdominus/docs/theme/css/tempusdominus-bootstrap-4.css +3 -1
- data/mod/date/vendor/tempusdominus/docs/theme/js/tempusdominus-bootstrap-4.js +127 -115
- data/mod/date/vendor/tempusdominus/docs/theme/toc.html +1 -0
- data/mod/date/vendor/tempusdominus/package-lock.json +4085 -8197
- data/mod/date/vendor/tempusdominus/package.json +17 -19
- data/mod/date/vendor/tempusdominus/src/docs/Installing.md +12 -18
- data/mod/date/vendor/tempusdominus/src/docs/Options.md +1 -1
- data/mod/date/vendor/tempusdominus/src/docs/Usage.md +0 -2
- data/mod/date/vendor/tempusdominus/src/docs/index.md +7 -5
- data/mod/date/vendor/tempusdominus/src/docs/theme/base.html +11 -12
- data/mod/date/vendor/tempusdominus/src/docs/theme/css/base.css +1682 -0
- data/mod/date/vendor/tempusdominus/src/docs/theme/css/tempusdominus-bootstrap-4.css +3 -1
- data/mod/date/vendor/tempusdominus/src/docs/theme/js/tempusdominus-bootstrap-4.js +127 -115
- data/mod/date/vendor/tempusdominus/src/docs/theme/toc.html +1 -0
- data/mod/date/vendor/tempusdominus/src/js/tempusdominus-bootstrap-4.js +32 -12
- data/mod/date/vendor/tempusdominus/src/sass/_tempusdominus-bootstrap-4.scss +4 -0
- data/mod/date/vendor/tempusdominus/src/sass/tempusdominus-bootstrap-4-build.scss +2 -2
- data/mod/edit/set/all/bridge.rb +4 -1
- data/mod/edit/set/all/bridge/tab_views.rb +4 -0
- data/mod/edit/set/all/bridge/tab_visibility.rb +4 -0
- data/mod/edit/set/all/edit_content.rb +9 -0
- data/mod/edit/set/all/edit_inline.rb +0 -4
- data/mod/edit/set/all/edit_type.rb +83 -12
- data/mod/edit/set/all/editing.rb +2 -2
- data/mod/edit/set/all/form.rb +1 -62
- data/mod/edit/set/all/form_buttons.rb +1 -1
- data/mod/edit/set/all/new.rb +52 -7
- data/mod/edit/spec/set/all/nest_editor_spec.rb +1 -1
- data/mod/follow/set/all/notify/base_views.rb +1 -3
- data/mod/machines/file/all_script_machine_output/file.js +72 -38108
- data/mod/machines/file/all_style_machine_output/file.css +3 -3
- data/mod/machines/file/script_html5shiv_printshiv_machine_output/file.js +1 -1
- data/mod/machines/lib/javascript/decko/decko.js.coffee +12 -3
- data/mod/machines/lib/javascript/decko/overlay.js.coffee +3 -0
- data/mod/machines/lib/javascript/decko/slotter.js.coffee +8 -0
- data/mod/machines/lib/stylesheets/style_cards.scss +15 -0
- data/mod/machines/spec/set/type/css_spec.rb +14 -14
- data/mod/machines/spec/shared_examples/machine_input.rb +6 -10
- data/mod/navbar/set/abstract/{roles_dropdown.rb → account_dropdown.rb} +8 -2
- data/mod/navbar/set/right/enabled_roles.rb +6 -8
- data/mod/navbar/set/self/account_links.rb +2 -2
- data/mod/navbar/spec/set/self/account_links_spec.rb +31 -0
- data/mod/pointer/set/abstract/02_pointer/html_views.rb +1 -1
- data/mod/rules/set/rule/editor.rb +1 -1
- data/mod/rules/set/type/set/setting_lists.rb +1 -1
- data/mod/search/set/self/search.rb +2 -0
- data/mod/settings/set/right/guide.rb +8 -0
- data/mod/settings/set/right/read.rb +1 -1
- data/mod/settings/set/self/guide.rb +3 -0
- data/mod/standard/set/all/rich_html/content.rb +0 -6
- data/mod/standard/set/all/rich_html/error.rb +3 -3
- data/mod/standard/set/all/rich_html/html_views/guide.rb +51 -0
- data/mod/standard/set/all/rich_html/html_views/help.rb +6 -0
- data/mod/standard/set/all/rich_html/overlay.rb +1 -1
- data/mod/standard/set/type/cardtype.rb +1 -1
- data/mod/tinymce_editor/lib/javascript/script_tinymce.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/jquery.tinymce.min.js +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/advlist/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/anchor/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/autolink/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/autoresize/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/autosave/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/bbcode/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/charmap/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/code/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/codesample/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/colorpicker/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/contextmenu/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/directionality/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/js/emojis.js +8941 -8941
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/fullpage/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/fullscreen/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/help/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/hr/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/image/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/imagetools/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/importcss/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/insertdatetime/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/legacyoutput/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/link/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/lists/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/media/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/nonbreaking/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/noneditable/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/pagebreak/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/paste/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/preview/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/print/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/quickbars/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/save/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/searchreplace/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/spellchecker/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/tabfocus/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/table/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/template/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/textcolor/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/textpattern/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/toc/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/visualblocks/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/visualchars/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/wordcount/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/skins/content/default/content.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/content/document/content.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/content/writer/content.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/content.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/content.mobile.min.css +7 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/skin.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/skin.mobile.min.css +7 -1
- data/mod/tinymce_editor/public/assets/tinymce/themes/mobile/theme.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/themes/silver/theme.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/tinymce.min.js +2 -2
- metadata +10 -47
- data/mod/date/vendor/tempusdominus/src/nuget/NuGet.exe +0 -0
- data/mod/date/vendor/tempusdominus/src/nuget/Tempus.Dominus.Bootstrap.4.nuspec +0 -29
- data/mod/tinymce_editor/public/assets/tinymce/plugins/codesample/css/prism.css +0 -138
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/help/img/logo.png +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/visualblocks/css/visualblocks.css +0 -154
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/content.inline.min.css +0 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/content.min.css +0 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/content.mobile.min.css +0 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce-mobile.woff +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce-small.svg +0 -63
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce.svg +0 -131
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/img/anchor.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/img/loader.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/img/object.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/img/trans.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/skin.min.css +0 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/skin.min.css.map +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/skin.mobile.min.css +0 -2
- data/mod/tinymce_editor/public/assets/tinymce/themes/inlite/theme.min.js +0 -1
- data/mod/tinymce_editor/public/assets/tinymce/themes/modern/theme.min.js +0 -1
@@ -158,12 +158,20 @@ const TempusDominusBootstrap4 = ($ => { // eslint-disable-line no-unused-vars
|
|
158
158
|
}).append($('<span>').addClass(this._options.icons.today))));
|
159
159
|
}
|
160
160
|
if (!this._options.sideBySide && this._hasDate() && this._hasTime()) {
|
161
|
+
let title, icon;
|
162
|
+
if (this._options.viewMode === 'times') {
|
163
|
+
title = this._options.tooltips.selectDate;
|
164
|
+
icon = this._options.icons.date;
|
165
|
+
} else {
|
166
|
+
title = this._options.tooltips.selectTime;
|
167
|
+
icon = this._options.icons.time;
|
168
|
+
}
|
161
169
|
row.push($('<td>').append($('<a>').attr({
|
162
170
|
href: '#',
|
163
171
|
tabindex: '-1',
|
164
172
|
'data-action': 'togglePicker',
|
165
|
-
'title':
|
166
|
-
}).append($('<span>').addClass(
|
173
|
+
'title': title
|
174
|
+
}).append($('<span>').addClass(icon))));
|
167
175
|
}
|
168
176
|
if (this._options.buttons.showClear) {
|
169
177
|
row.push($('<td>').append($('<a>').attr({
|
@@ -219,7 +227,7 @@ const TempusDominusBootstrap4 = ($ => { // eslint-disable-line no-unused-vars
|
|
219
227
|
}
|
220
228
|
if (this._hasDate()) {
|
221
229
|
content.append($('<li>').addClass(this._options.collapse && this._hasTime() ? 'collapse' : '')
|
222
|
-
.addClass((this._options.collapse && this._hasTime() && this._options.viewMode === '
|
230
|
+
.addClass((this._options.collapse && this._hasTime() && this._options.viewMode === 'times' ? '' : 'show'))
|
223
231
|
.append(dateView));
|
224
232
|
}
|
225
233
|
if (this._options.toolbarPlacement === 'default') {
|
@@ -227,7 +235,7 @@ const TempusDominusBootstrap4 = ($ => { // eslint-disable-line no-unused-vars
|
|
227
235
|
}
|
228
236
|
if (this._hasTime()) {
|
229
237
|
content.append($('<li>').addClass(this._options.collapse && this._hasDate() ? 'collapse' : '')
|
230
|
-
.addClass((this._options.collapse && this._hasDate() && this._options.viewMode === '
|
238
|
+
.addClass((this._options.collapse && this._hasDate() && this._options.viewMode === 'times' ? 'show' : ''))
|
231
239
|
.append(timeView));
|
232
240
|
}
|
233
241
|
if (this._options.toolbarPlacement === 'bottom') {
|
@@ -394,12 +402,12 @@ const TempusDominusBootstrap4 = ($ => { // eslint-disable-line no-unused-vars
|
|
394
402
|
yearsViewHeader.eq(2).addClass('disabled');
|
395
403
|
}
|
396
404
|
|
397
|
-
html += `<span data-action="selectYear" class="year old">${startYear.year() - 1}</span>`;
|
405
|
+
html += `<span data-action="selectYear" class="year old${!this._isValid(startYear, 'y') ? ' disabled' : ''}">${startYear.year() - 1}</span>`;
|
398
406
|
while (!startYear.isAfter(endYear, 'y')) {
|
399
407
|
html += `<span data-action="selectYear" class="year${startYear.isSame(this._getLastPickedDate(), 'y') && !this.unset ? ' active' : ''}${!this._isValid(startYear, 'y') ? ' disabled' : ''}">${startYear.year()}</span>`;
|
400
408
|
startYear.add(1, 'y');
|
401
409
|
}
|
402
|
-
html += `<span data-action="selectYear" class="year old">${startYear.year()}</span>`;
|
410
|
+
html += `<span data-action="selectYear" class="year old${!this._isValid(startYear, 'y') ? ' disabled' : ''}">${startYear.year()}</span>`;
|
403
411
|
|
404
412
|
yearsView.find('td').html(html);
|
405
413
|
}
|
@@ -635,7 +643,7 @@ const TempusDominusBootstrap4 = ($ => { // eslint-disable-line no-unused-vars
|
|
635
643
|
{
|
636
644
|
const month = $(e.target).closest('tbody').find('span').index($(e.target));
|
637
645
|
this._viewDate.month(month);
|
638
|
-
if (this.currentViewMode ===
|
646
|
+
if (this.currentViewMode === this.MinViewModeNumber) {
|
639
647
|
this._setValue(lastPicked.clone().year(this._viewDate.year()).month(this._viewDate.month()), this._getLastPickedDateIndex());
|
640
648
|
if (!this._options.inline) {
|
641
649
|
this.hide();
|
@@ -651,7 +659,7 @@ const TempusDominusBootstrap4 = ($ => { // eslint-disable-line no-unused-vars
|
|
651
659
|
{
|
652
660
|
const year = parseInt($(e.target).text(), 10) || 0;
|
653
661
|
this._viewDate.year(year);
|
654
|
-
if (this.currentViewMode ===
|
662
|
+
if (this.currentViewMode === this.MinViewModeNumber) {
|
655
663
|
this._setValue(lastPicked.clone().year(this._viewDate.year()), this._getLastPickedDateIndex());
|
656
664
|
if (!this._options.inline) {
|
657
665
|
this.hide();
|
@@ -667,7 +675,7 @@ const TempusDominusBootstrap4 = ($ => { // eslint-disable-line no-unused-vars
|
|
667
675
|
{
|
668
676
|
const year = parseInt($(e.target).data('selection'), 10) || 0;
|
669
677
|
this._viewDate.year(year);
|
670
|
-
if (this.currentViewMode ===
|
678
|
+
if (this.currentViewMode === this.MinViewModeNumber) {
|
671
679
|
this._setValue(lastPicked.clone().year(this._viewDate.year()), this._getLastPickedDateIndex());
|
672
680
|
if (!this._options.inline) {
|
673
681
|
this.hide();
|
@@ -688,8 +696,20 @@ const TempusDominusBootstrap4 = ($ => { // eslint-disable-line no-unused-vars
|
|
688
696
|
if ($(e.target).is('.new')) {
|
689
697
|
day.add(1, 'M');
|
690
698
|
}
|
691
|
-
|
692
|
-
|
699
|
+
|
700
|
+
var selectDate = day.date(parseInt($(e.target).text(), 10)), index = 0;
|
701
|
+
if (this._options.allowMultidate) {
|
702
|
+
index = this._datesFormatted.indexOf(selectDate.format('YYYY-MM-DD'));
|
703
|
+
if (index !== -1) {
|
704
|
+
this._setValue(null, index); //deselect multidate
|
705
|
+
} else {
|
706
|
+
this._setValue(selectDate, this._getLastPickedDateIndex() + 1);
|
707
|
+
}
|
708
|
+
} else {
|
709
|
+
this._setValue(selectDate, this._getLastPickedDateIndex());
|
710
|
+
}
|
711
|
+
|
712
|
+
if (!this._hasTime() && !this._options.keepOpen && !this._options.inline && !this._options.allowMultidate) {
|
693
713
|
this.hide();
|
694
714
|
}
|
695
715
|
break;
|
@@ -1148,7 +1168,7 @@ const TempusDominusBootstrap4 = ($ => { // eslint-disable-line no-unused-vars
|
|
1148
1168
|
if (!config._options.allowInputToggle) {
|
1149
1169
|
return;
|
1150
1170
|
}
|
1151
|
-
TempusDominusBootstrap4._jQueryInterface.call($target,
|
1171
|
+
TempusDominusBootstrap4._jQueryInterface.call($target, 'show', event);
|
1152
1172
|
});
|
1153
1173
|
|
1154
1174
|
$.fn[DateTimePicker.NAME] = TempusDominusBootstrap4._jQueryInterface;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Import bootstrap variables including default color palette and fonts
|
2
|
-
@import "bootstrap/scss/_functions.scss";
|
3
|
-
@import "bootstrap/scss/_variables.scss";
|
2
|
+
@import "~bootstrap/scss/_functions.scss";
|
3
|
+
@import "~bootstrap/scss/_variables.scss";
|
4
4
|
|
5
5
|
.sr-only {
|
6
6
|
position: absolute;
|
data/mod/edit/set/all/bridge.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
format :html do
|
2
2
|
BRIDGE_TABS = { account_tab: "Account",
|
3
|
+
guide_tab: "Guide",
|
3
4
|
engage_tab: "Engage",
|
4
5
|
history_tab: "History",
|
5
6
|
related_tab: "Related",
|
@@ -53,7 +54,9 @@ format :html do
|
|
53
54
|
end
|
54
55
|
|
55
56
|
def default_bridge_tab
|
56
|
-
show_account_tab?
|
57
|
+
(show_account_tab? && :account_tab) ||
|
58
|
+
(show_guide_tab? && :guide_tab) ||
|
59
|
+
:engage_tab
|
57
60
|
end
|
58
61
|
|
59
62
|
def breadcrumb_data title, html_class=nil
|
@@ -1,15 +1,24 @@
|
|
1
1
|
format :html do
|
2
2
|
view :edit_content_form, wrap: :slot do
|
3
|
+
voo.show :edit_type_row
|
3
4
|
with_nest_mode :edit do
|
4
5
|
edit_form
|
5
6
|
end
|
6
7
|
end
|
7
8
|
|
8
9
|
def edit_form
|
10
|
+
voo.hide :edit_type_row
|
9
11
|
form_opts = edit_form_opts.reverse_merge success: edit_success
|
10
12
|
card_form(:update, form_opts) do
|
11
13
|
[
|
12
14
|
edit_view_hidden,
|
15
|
+
_render_edit_type_row(home_view: :edit_type_row),
|
16
|
+
# home_view is necessary for cancel to work correctly.
|
17
|
+
# it seems a little strange to have to think about home_view here,
|
18
|
+
# but the issue is that something currently has to happen prior to the
|
19
|
+
# render to get voo.slot_options to have the write home view in
|
20
|
+
# the slot wrap. Id think this would probably best be handled as an
|
21
|
+
# option to #wrap that triggers a new heir voo
|
13
22
|
_render_content_formgroup,
|
14
23
|
_render_edit_buttons
|
15
24
|
]
|
@@ -16,10 +16,6 @@ format :html do
|
|
16
16
|
edit_row_fixed_width "Name", card.name, :edit_name_form
|
17
17
|
end
|
18
18
|
|
19
|
-
view :edit_type_row do
|
20
|
-
edit_row_fixed_width "Type", link_to_card(card.type), :edit_type_form
|
21
|
-
end
|
22
|
-
|
23
19
|
view :edit_inline_buttons do
|
24
20
|
button_formgroup do
|
25
21
|
wrap_with "div", class: "d-flex" do
|
@@ -1,28 +1,99 @@
|
|
1
1
|
format :html do
|
2
|
-
|
2
|
+
GROUP = {
|
3
|
+
"Content" => %w[RichText PlainText Phrase Date Number Toggle Markdown File Image URI],
|
4
|
+
"Custom" => [],
|
5
|
+
"Organize" => ["Cardtype", "Search", "List", "Link list", "Pointer",
|
6
|
+
"Mirror list", "Mirrored list"],
|
7
|
+
"Admin" => ["Layout", "Skin", "User", "Role",
|
8
|
+
"Notification template", "Email template", "Twitter template"],
|
9
|
+
"Code" => %w[HTML Json CSS SCSS JavaScript CoffeeScript]
|
10
|
+
}.freeze
|
11
|
+
|
12
|
+
# group for each cardtype: { "RichText => "Content", "Layout" => "Admin", ... }
|
13
|
+
GROUP_MAP = GROUP.each_with_object({}) do |(cat, types), h|
|
14
|
+
types.each { |t| h[t] = cat }
|
15
|
+
end
|
16
|
+
|
17
|
+
view :edit_type, cache: :never, perms: :update do
|
3
18
|
frame do
|
4
19
|
_render_edit_type_form
|
5
20
|
end
|
6
21
|
end
|
7
22
|
|
8
23
|
view :edit_type_form, cache: :never, perms: :update, wrap: :slot do
|
9
|
-
card_form :update,
|
10
|
-
|
11
|
-
success: edit_type_success do
|
12
|
-
[_render_type_formgroup,
|
13
|
-
edit_type_buttons]
|
24
|
+
card_form :update, success: edit_type_success do
|
25
|
+
[type_formgroup, render_new_buttons]
|
14
26
|
end
|
15
27
|
end
|
16
28
|
|
17
29
|
def edit_type_success
|
18
|
-
|
19
|
-
|
20
|
-
|
30
|
+
{ view: :core }
|
31
|
+
end
|
32
|
+
|
33
|
+
view :edit_type_row do
|
34
|
+
return _render_bridge_type_formgroup if voo.visible?(:type_form) { false }
|
35
|
+
|
36
|
+
edit_row_fixed_width "Type", link_to_card(card.type), :bridge_type_formgroup
|
21
37
|
end
|
22
38
|
|
23
|
-
|
24
|
-
|
25
|
-
|
39
|
+
view :bridge_type_formgroup, unknown: true, wrap: :slot do
|
40
|
+
type_formgroup href: path(mark: card.id, view: :edit_content_form, type_reload: true, slot: { show: :type_form }),
|
41
|
+
class: "live-type-field slotter",
|
42
|
+
'data-remote': true,
|
43
|
+
'data-slot-selector': ".card-slot.edit_content_form-view"
|
44
|
+
end
|
45
|
+
|
46
|
+
view :type_formgroup do
|
47
|
+
type_formgroup
|
48
|
+
end
|
49
|
+
|
50
|
+
def type_formgroup args={}
|
51
|
+
add_class args, "type-field"
|
52
|
+
wrap_type_formgroup do
|
53
|
+
type_field args
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def wrap_type_formgroup
|
58
|
+
formgroup "Type", editor: "type", class: "type-formgroup", help: false do
|
59
|
+
output [yield, hidden_field_tag(:assign, true)]
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def type_field args={}
|
64
|
+
typelist = Auth.createable_types
|
65
|
+
current_type = type_field_current_value args, typelist
|
66
|
+
options = grouped_options_for_select grouped_types(current_type), current_type
|
67
|
+
template.select_tag "card[type]", options, args
|
68
|
+
end
|
69
|
+
|
70
|
+
def grouped_types current_type
|
71
|
+
groups = Hash.new { |h, k| h[k] = [] }
|
72
|
+
allowed = ::Set.new Auth.createable_types
|
73
|
+
allowed << current_type if current_type
|
74
|
+
|
75
|
+
GROUP.each_pair do |name, items|
|
76
|
+
if name == "Custom"
|
77
|
+
Auth.createable_types.each do |type|
|
78
|
+
groups["Custom"] << type unless GROUP_MAP[type]
|
79
|
+
end
|
80
|
+
else
|
81
|
+
items.each do |i|
|
82
|
+
groups[name] << i if allowed.include?(i)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
groups
|
87
|
+
end
|
88
|
+
|
89
|
+
def type_field_current_value args, typelist
|
90
|
+
return if args.delete :no_current_type
|
91
|
+
|
92
|
+
if !card.new_card? && !typelist.include?(card.type_name)
|
93
|
+
# current type should be an option on existing cards,
|
94
|
+
# regardless of create perms
|
95
|
+
typelist.push(card.type_name).sort!
|
26
96
|
end
|
97
|
+
card.type_name_or_default
|
27
98
|
end
|
28
99
|
end
|
data/mod/edit/set/all/editing.rb
CHANGED
@@ -10,16 +10,16 @@ format :html do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def bridge_parts
|
13
|
+
voo.show! :edit_type_row
|
13
14
|
[
|
15
|
+
frame_help,
|
14
16
|
_render_edit_name_row(home_view: :edit_name_row),
|
15
|
-
_render_edit_type_row(home_view: :edit_type_row),
|
16
17
|
# home_view is necessary for cancel to work correctly.
|
17
18
|
# it seems a little strange to have to think about home_view here,
|
18
19
|
# but the issue is that something currently has to happen prior to the
|
19
20
|
# render to get voo.slot_options to have the write home view in
|
20
21
|
# the slot wrap. I think this would probably best be handled as an
|
21
22
|
# option to #wrap that triggers a new heir voo
|
22
|
-
frame_help,
|
23
23
|
_render_edit_content_form
|
24
24
|
]
|
25
25
|
end
|
data/mod/edit/set/all/form.rb
CHANGED
@@ -10,24 +10,12 @@ format :html do
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
view :type_formgroup do
|
14
|
-
wrap_type_formgroup do
|
15
|
-
type_field class: "type-field edit-type-field"
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
13
|
view :edit_in_form, cache: :never, perms: :update, unknown: true do
|
20
14
|
reset_form
|
21
15
|
@in_multi_card_editor = true
|
22
16
|
edit_slot
|
23
17
|
end
|
24
18
|
|
25
|
-
def wrap_type_formgroup
|
26
|
-
formgroup "type", editor: "type", class: "type-formgroup", help: false do
|
27
|
-
yield
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
19
|
def button_formgroup
|
32
20
|
wrap_with :div, class: classy("form-group") do
|
33
21
|
wrap_with :div, yield
|
@@ -39,55 +27,6 @@ format :html do
|
|
39
27
|
text_field :name, value: card.name, autocomplete: "off"
|
40
28
|
end
|
41
29
|
|
42
|
-
def type_field args={}
|
43
|
-
typelist = Auth.createable_types
|
44
|
-
current_type = type_field_current_value args, typelist
|
45
|
-
options = grouped_options_for_select grouped_types(current_type), current_type
|
46
|
-
template.select_tag "card[type]", options, args
|
47
|
-
end
|
48
|
-
|
49
|
-
GROUP = {
|
50
|
-
"Content" => %w[RichText PlainText Phrase Date Number Toggle Markdown File Image URI],
|
51
|
-
"Custom" => [],
|
52
|
-
"Organize" => ["Cardtype", "Search", "List", "Link list", "Pointer",
|
53
|
-
"Mirror list", "Mirrored list"],
|
54
|
-
"Admin" => ["Layout", "Skin", "User", "Role",
|
55
|
-
"Notification template", "Email template", "Twitter template" ],
|
56
|
-
"Code" => ["HTML", "Json", "CSS", "SCSS", "JavaScript", "CoffeeScript"]
|
57
|
-
}.freeze
|
58
|
-
|
59
|
-
# group for each cardtype: { "RichText => "Content", "Layout" => "Admin", ... }
|
60
|
-
GROUP_MAP = GROUP.each_with_object({}) do |(cat, types), h|
|
61
|
-
types.each { |t| h[t] = cat }
|
62
|
-
end
|
63
|
-
|
64
|
-
def grouped_types current_type
|
65
|
-
groups = Hash.new { |h, k| h[k] = [] }
|
66
|
-
allowed = ::Set.new Auth.createable_types
|
67
|
-
allowed << current_type if current_type
|
68
|
-
|
69
|
-
GROUP.each_pair do |name, items|
|
70
|
-
items.each do |i|
|
71
|
-
groups[name] << i if allowed.include?(i)
|
72
|
-
end
|
73
|
-
end
|
74
|
-
Auth.createable_types.each do |type|
|
75
|
-
groups["Custom"] << type unless GROUP_MAP[type]
|
76
|
-
end
|
77
|
-
groups
|
78
|
-
end
|
79
|
-
|
80
|
-
def type_field_current_value args, typelist
|
81
|
-
return if args.delete :no_current_type
|
82
|
-
|
83
|
-
if !card.new_card? && !typelist.include?(card.type_name)
|
84
|
-
# current type should be an option on existing cards,
|
85
|
-
# regardless of create perms
|
86
|
-
typelist.push(card.type_name).sort!
|
87
|
-
end
|
88
|
-
card.type_name_or_default
|
89
|
-
end
|
90
|
-
|
91
30
|
def content_field skip_rev_id=false
|
92
31
|
with_nest_mode :normal do
|
93
32
|
# by changing nest mode to normal, we ensure that editors (eg image
|
@@ -143,7 +82,7 @@ format :html do
|
|
143
82
|
def single_card_edit_field
|
144
83
|
if voo.show?(:type_formgroup) || voo.show?(:name_formgroup)
|
145
84
|
# display content field in formgroup for consistency with other fields
|
146
|
-
formgroup("
|
85
|
+
formgroup("Content", editor: :content, help: false) { content_field }
|
147
86
|
else
|
148
87
|
editor_wrap(:content) { content_field }
|
149
88
|
end
|
@@ -17,7 +17,7 @@ format :html do
|
|
17
17
|
def standard_save_and_close_button opts={}
|
18
18
|
close = opts.delete(:close) || :modal
|
19
19
|
text = opts[:text] || "Save and Close"
|
20
|
-
add_class opts, "submit-button btn-sm mr-3 _close
|
20
|
+
add_class opts, "submit-button btn-sm mr-3 _close-on-success"
|
21
21
|
add_class opts, "_update-origin" unless opts[:no_origin_update]
|
22
22
|
opts.reverse_merge! text: text, "data-cy": "submit-#{close}"
|
23
23
|
|