From 70f0019905f8c44ed875379a9af65988e536b4f4 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Thu, 1 Jan 2015 10:08:20 +0100 Subject: Checkboxify yesno-fields, but use CSS to show them as switches in Redbasic --- view/tpl/field_checkbox.tpl | 3 +-- view/tpl/field_intcheckbox.tpl | 3 +-- view/tpl/profile_hide_friends.tpl | 5 ++++- view/tpl/settings.tpl | 2 +- view/tpl/settings_features.tpl | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) (limited to 'view/tpl') diff --git a/view/tpl/field_checkbox.tpl b/view/tpl/field_checkbox.tpl index 51d56f69c..7e4f00a2d 100755 --- a/view/tpl/field_checkbox.tpl +++ b/view/tpl/field_checkbox.tpl @@ -1,5 +1,4 @@
- - {{$field.3}} + {{$field.3}}
diff --git a/view/tpl/field_intcheckbox.tpl b/view/tpl/field_intcheckbox.tpl index d9a8d7289..41ee46822 100755 --- a/view/tpl/field_intcheckbox.tpl +++ b/view/tpl/field_intcheckbox.tpl @@ -1,5 +1,4 @@
- - {{$field.4}} + {{$field.4}}
diff --git a/view/tpl/profile_hide_friends.tpl b/view/tpl/profile_hide_friends.tpl index 1d748cd4e..4ed6782bb 100644 --- a/view/tpl/profile_hide_friends.tpl +++ b/view/tpl/profile_hide_friends.tpl @@ -1,3 +1,6 @@ +{{include file="field_checkbox.tpl"}} + +{{*

{{$desc}}

@@ -14,4 +17,4 @@
- +*}} diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index 47d85d8e4..9e53d4f98 100755 --- a/view/tpl/settings.tpl +++ b/view/tpl/settings.tpl @@ -62,7 +62,7 @@ {{$suggestme}} -{{include file="field_yesno.tpl" field=$blocktags}} +{{include file="field_checkbox.tpl" field=$blocktags}} {{include file="field_input.tpl" field=$expire}} diff --git a/view/tpl/settings_features.tpl b/view/tpl/settings_features.tpl index 3291162fa..3ede4c76d 100755 --- a/view/tpl/settings_features.tpl +++ b/view/tpl/settings_features.tpl @@ -9,7 +9,7 @@

{{$f.0}}

{{foreach $f.1 as $fcat}} - {{include file="{{$field_yesno}}" field=$fcat}} + {{include file="field_checkbox.tpl" field=$fcat}} {{/foreach}} {{/foreach}} -- cgit v1.2.3 From ef6680f7adfeacb0e7614c509e8861f08ff066e8 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Thu, 1 Jan 2015 11:33:00 +0100 Subject: Possibly make switches work on IE8 (untested) --- view/tpl/field_acheckbox.tpl | 2 +- view/tpl/field_checkbox.tpl | 4 ++-- view/tpl/field_colorinput.tpl | 2 +- view/tpl/field_combobox.tpl | 2 +- view/tpl/field_custom.tpl | 2 +- view/tpl/field_input.tpl | 2 +- view/tpl/field_intcheckbox.tpl | 4 ++-- view/tpl/field_password.tpl | 2 +- view/tpl/field_radio.tpl | 2 +- view/tpl/field_richtext.tpl | 2 +- view/tpl/field_select.tpl | 2 +- view/tpl/field_select_disabled.tpl | 2 +- view/tpl/field_select_raw.tpl | 2 +- view/tpl/field_textarea.tpl | 2 +- view/tpl/field_themeselect.tpl | 2 +- view/tpl/field_yesno.tpl | 2 +- 16 files changed, 18 insertions(+), 18 deletions(-) (limited to 'view/tpl') diff --git a/view/tpl/field_acheckbox.tpl b/view/tpl/field_acheckbox.tpl index 89de170b7..816af2a65 100755 --- a/view/tpl/field_acheckbox.tpl +++ b/view/tpl/field_acheckbox.tpl @@ -1,6 +1,6 @@ - + diff --git a/view/tpl/field_checkbox.tpl b/view/tpl/field_checkbox.tpl index 7e4f00a2d..5c7f58ad1 100755 --- a/view/tpl/field_checkbox.tpl +++ b/view/tpl/field_checkbox.tpl @@ -1,4 +1,4 @@
- - {{$field.3}} + + {{$field.3}}
diff --git a/view/tpl/field_colorinput.tpl b/view/tpl/field_colorinput.tpl index a68781698..a1e912186 100644 --- a/view/tpl/field_colorinput.tpl +++ b/view/tpl/field_colorinput.tpl @@ -1,5 +1,5 @@
- + {{if $field.4}} {{$field.4}} {{/if}} {{$field.3}}
diff --git a/view/tpl/field_combobox.tpl b/view/tpl/field_combobox.tpl index 1f9218954..337c60673 100755 --- a/view/tpl/field_combobox.tpl +++ b/view/tpl/field_combobox.tpl @@ -1,5 +1,5 @@
- + {{* html5 don't work on Chrome, Safari and IE9 see https://github.com/thgreasi/datalist-polyfill diff --git a/view/tpl/field_custom.tpl b/view/tpl/field_custom.tpl index a6b49f6da..754f5b2f4 100755 --- a/view/tpl/field_custom.tpl +++ b/view/tpl/field_custom.tpl @@ -1,5 +1,5 @@
- + {{$field.2}} {{$field.3}}
diff --git a/view/tpl/field_input.tpl b/view/tpl/field_input.tpl index a584f95e7..be6e3f047 100755 --- a/view/tpl/field_input.tpl +++ b/view/tpl/field_input.tpl @@ -1,5 +1,5 @@
- + {{if $field.4}} {{$field.4}} {{/if}} {{$field.3}}
diff --git a/view/tpl/field_intcheckbox.tpl b/view/tpl/field_intcheckbox.tpl index 41ee46822..1d0bd9175 100755 --- a/view/tpl/field_intcheckbox.tpl +++ b/view/tpl/field_intcheckbox.tpl @@ -1,4 +1,4 @@
- - {{$field.4}} + + {{$field.4}}
diff --git a/view/tpl/field_password.tpl b/view/tpl/field_password.tpl index 23058f8a6..38ecf3d07 100755 --- a/view/tpl/field_password.tpl +++ b/view/tpl/field_password.tpl @@ -1,5 +1,5 @@
- + {{$field.3}}
diff --git a/view/tpl/field_radio.tpl b/view/tpl/field_radio.tpl index 147b6b834..a92324cad 100755 --- a/view/tpl/field_radio.tpl +++ b/view/tpl/field_radio.tpl @@ -1,5 +1,5 @@
- + {{$field.3}}
diff --git a/view/tpl/field_richtext.tpl b/view/tpl/field_richtext.tpl index c8639cf10..378e02a62 100755 --- a/view/tpl/field_richtext.tpl +++ b/view/tpl/field_richtext.tpl @@ -1,5 +1,5 @@
- + {{$field.3}}
diff --git a/view/tpl/field_select.tpl b/view/tpl/field_select.tpl index 9aca26e7b..95d1855d6 100755 --- a/view/tpl/field_select.tpl +++ b/view/tpl/field_select.tpl @@ -1,5 +1,5 @@
- + diff --git a/view/tpl/field_select_disabled.tpl b/view/tpl/field_select_disabled.tpl index f0090cf98..e241be895 100644 --- a/view/tpl/field_select_disabled.tpl +++ b/view/tpl/field_select_disabled.tpl @@ -1,5 +1,5 @@
- + diff --git a/view/tpl/field_select_raw.tpl b/view/tpl/field_select_raw.tpl index 861be3201..74d575bd0 100755 --- a/view/tpl/field_select_raw.tpl +++ b/view/tpl/field_select_raw.tpl @@ -1,5 +1,5 @@
- + diff --git a/view/tpl/field_textarea.tpl b/view/tpl/field_textarea.tpl index b454045c0..dad89a145 100755 --- a/view/tpl/field_textarea.tpl +++ b/view/tpl/field_textarea.tpl @@ -1,5 +1,5 @@
- + {{$field.3}}
diff --git a/view/tpl/field_themeselect.tpl b/view/tpl/field_themeselect.tpl index a0e454bf5..120727478 100755 --- a/view/tpl/field_themeselect.tpl +++ b/view/tpl/field_themeselect.tpl @@ -1,6 +1,6 @@
- + diff --git a/view/tpl/field_yesno.tpl b/view/tpl/field_yesno.tpl index e36e775c7..f5a909833 100755 --- a/view/tpl/field_yesno.tpl +++ b/view/tpl/field_yesno.tpl @@ -1,5 +1,5 @@
- +
-- cgit v1.2.3 From ef94747e5eb4d8b2e3566835280c31b848fc28e6 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Thu, 1 Jan 2015 14:36:17 +0100 Subject: Add field template for grouped selects --- view/tpl/field_select_grouped.tpl | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 view/tpl/field_select_grouped.tpl (limited to 'view/tpl') diff --git a/view/tpl/field_select_grouped.tpl b/view/tpl/field_select_grouped.tpl new file mode 100644 index 000000000..c7fb4f322 --- /dev/null +++ b/view/tpl/field_select_grouped.tpl @@ -0,0 +1,12 @@ +
+ + + {{$field.3}} +
-- cgit v1.2.3 From 686b6ee1182c09969e2817b53825a78975c75bf5 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Thu, 1 Jan 2015 14:44:50 +0100 Subject: Use grouped select field for timezone selection --- view/tpl/install_settings.tpl | 2 +- view/tpl/settings.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'view/tpl') diff --git a/view/tpl/install_settings.tpl b/view/tpl/install_settings.tpl index f4fd82fdb..62dcbb8b3 100755 --- a/view/tpl/install_settings.tpl +++ b/view/tpl/install_settings.tpl @@ -20,7 +20,7 @@ {{include file="field_input.tpl" field=$adminmail}} {{include file="field_input.tpl" field=$siteurl}} -{{$timezone}} +{{include file="field_select_grouped.tpl" field=$timezone}} diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index 47d85d8e4..83da4f87e 100755 --- a/view/tpl/settings.tpl +++ b/view/tpl/settings.tpl @@ -9,7 +9,7 @@

{{$h_basic}}

{{include file="field_input.tpl" field=$username}} -{{include file="field_custom.tpl" field=$timezone}} +{{include file="field_select_grouped.tpl" field=$timezone}} {{include file="field_input.tpl" field=$defloc}} {{include file="field_checkbox.tpl" field=$allowloc}} -- cgit v1.2.3 From 85e76773a04995884e798a89cc285f48377bcb62 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Thu, 1 Jan 2015 15:54:16 +0100 Subject: Use grouped select field for role selection --- view/tpl/new_channel.tpl | 5 +---- view/tpl/select_timezone.tpl | 11 +++++++++++ view/tpl/settings.tpl | 5 +---- 3 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 view/tpl/select_timezone.tpl (limited to 'view/tpl') diff --git a/view/tpl/new_channel.tpl b/view/tpl/new_channel.tpl index 241846eb4..ff2011181 100755 --- a/view/tpl/new_channel.tpl +++ b/view/tpl/new_channel.tpl @@ -5,10 +5,7 @@
{{$desc}}
{{$help_role}}
- - - {{$role_select}} -
+ {{include file="field_select_grouped.tpl" field=$role}}
diff --git a/view/tpl/select_timezone.tpl b/view/tpl/select_timezone.tpl new file mode 100644 index 000000000..2820a54f4 --- /dev/null +++ b/view/tpl/select_timezone.tpl @@ -0,0 +1,11 @@ +{{* TODO: Make id configurabel *}} + + diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index 83da4f87e..53f08e24f 100755 --- a/view/tpl/settings.tpl +++ b/view/tpl/settings.tpl @@ -22,10 +22,7 @@

{{$h_prv}}

-
- -{{$role_select}} -
+{{include file="field_select_grouped.tpl" field=$role}}
{{include file="field_checkbox.tpl" field=$hide_presence}} -- cgit v1.2.3 From 1c2dc97a4a6e740d97ee29c8b7c4d0e37832ff4c Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Thu, 1 Jan 2015 18:19:17 +0100 Subject: Double click on day in calendar creats new event starting that day --- view/tpl/event_head.tpl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'view/tpl') diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl index bcb1e07f6..03ea833f9 100755 --- a/view/tpl/event_head.tpl +++ b/view/tpl/event_head.tpl @@ -24,6 +24,11 @@ eventClick: function(calEvent, jsEvent, view) { showEvent(calEvent.id); }, + loading: function(isLoading, view) { + if(!isLoading) { + $('td.fc-day').dblclick(function() { window.location.href='https://caterva.eu/events/new?start='+$(this).data('date'); }); + } + }, eventRender: function(event, element, view) { //console.log(view.name); -- cgit v1.2.3