From b069df452cd79ead120406a4020dcb0a5ee88e6a Mon Sep 17 00:00:00 2001 From: Peter Howell Date: Mon, 21 Jul 2025 11:41:18 -0700 Subject: [PATCH] 'styling' --- js/dir_app.js | 448 +++++++++++++++++++++++++++++++++++--------------- style.css | 3 +- 2 files changed, 319 insertions(+), 132 deletions(-) diff --git a/js/dir_app.js b/js/dir_app.js index b2795aa..0e300c7 100644 --- a/js/dir_app.js +++ b/js/dir_app.js @@ -101,8 +101,18 @@ const TQuestion = Vue.component('field', { "answer": function(val,Oldval) { this.a = val }, "a": function (val, oldVal) { this.$root.events.trigger('changed',[this.qid,this.table, val, this.targetid]) }, }, - template: `
-
`, + template: `
+ + +
`, }) // A single INLINE text style question @@ -144,8 +154,17 @@ const TAQuestion = Vue.component('tfield', { this.$root.events.trigger('changed',[this.qid,this.table, val, this.targetid]) }, "answer": function (val, oldVal) { this.a = val }, }, - template: `
-
` }) + template: `
+ + +
` }) @@ -162,7 +181,7 @@ const HTAQuestion = Vue.component('htfield', { watch: { "answer": function (val, oldVal) { this.p.content.innerHTML = val }, }, template: `
-
` }) +
` }) // long format text WYSIWYG HTML FORM ALIGNED STYLE const HTAQuestionFA = Vue.component('htfield_fa', { @@ -176,8 +195,8 @@ const HTAQuestionFA = Vue.component('htfield_fa', { self.p.content.innerHTML = self.answer }, watch: { "answer": function (val, oldVal) { this.p.content.innerHTML = val }, }, - template: `
-
` }) + template: `
+
` }) // A single numeric question const NQuestioon = Vue.component('n-question', { @@ -243,9 +262,20 @@ const SelMenu = Vue.component('selectmenu', { "a": function (val, oldVal) { this.$root.events.trigger('changed',[this.qid,this.table, val, this.targetid]) }, "answer": function (val, oldVal) { this.a = val }, }, - template: `` }) + template: `
+ + +
` }) // Select menu FORM ALIGNED STYLE @@ -256,10 +286,20 @@ const SelMenuFA = Vue.component('selectmenu_fa', { "a": function (val, oldVal) { this.$root.events.trigger('changed',[this.qid,this.table, val, this.targetid]) }, "answer": function (val, oldVal) { this.a = val }, }, - template: `
-
` }) + template: `
+ + +
` }) // A date time picker @@ -272,8 +312,18 @@ const DTPicker = Vue.component('dtpicker', { "answer": function(val,Oldval) { this.a = val }, "a": function (val, oldVal) { this.$root.events.trigger('changed',[this.qid,this.table, val, this.targetid]) }, }, - template: `
-
`, + template: `
+ + +
`, }) @@ -655,7 +705,7 @@ const ActivityEditor = Vue.component('activityedit', { function(r2) { self.everyone = r2.users _.each( self.everyone, function(x) { - x.hostid = x.id } ) + x.hostid = x.hostid } ) self.everyname = _.pluck(r2.users,'name') } ) }, fetch_myevents: function() { var self = this; @@ -669,8 +719,9 @@ const ActivityEditor = Vue.component('activityedit', { self.this_activity.starttime = self.this_activity.starttime.replace(' ','T')} ) basic_get('dir_api.php?a=get/hosts', function(r2) { - self.hosts_by_sesid = _.groupBy(r2,function(x) { return x.id } ) - self.this_hosts = self.hosts_by_sesid[ self.my_activity ] + var filtered = r2.filter(x => x.hostid != null) + self.hosts_by_sesid = _.groupBy(filtered,function(x) { return x.id } ) + self.this_hosts = self.hosts_by_sesid[ self.my_activity ] } ) }, }, @@ -703,7 +754,7 @@ const ActivityEditor = Vue.component('activityedit', { qid="mode" :answer="this_activity.mode" menu="modes_menu" :targetid="this_activity.id" question="What mode?" labelfield="string"> + :targetid="this_activity.id" question="Length (in hours or minutes)" placeholder="1">
-
- -
- {{h.name}} - x
-
-
-
- -
-
- -
-
- {{ho.name}} - +
- -
-
-
-
- -
- -
-
- + + + +
+ +
+ type below to add a host +
+ {{ h.name }} + +
+
+
+ + +
+ + +
+
+ + {{ ho.name }} + +
+
+
+ + +
+ +
- - - - - -
- -
- -
- -
-
- - -
-
- Edit -
-
- {{this_activity.title}}
- {{ $root.$dj(this_activity.starttime).format('h:mma') }} / {{ this_activity.mode }}
- Presented by: {{ h.name }},
-
- - -
+ +
+ + + + + + + + + + + + + +
+ +
+
+ {{ h.name }} +
- +
+ Add a host by typing below +
+
+
-
` }) + +
+ + +
+
+ + {{ ho.name }} + + +
+
+
+ + + + + + + + +
+ +
+ + + + +
+

{{ this_activity.title }}

+ +

+ {{ $root.$dj(this_activity.starttime).format('h:mma') }} / + {{ this_activity.mode }} +

+ +

+ Presented by: + + {{ h.name }}, + +

+ +
+
+
+ +` }) diff --git a/style.css b/style.css index fd15a07..89f1bec 100644 --- a/style.css +++ b/style.css @@ -10,7 +10,8 @@ height:300px; outline:0; overflow-y:auto; - padding:10px + padding:10px; + background-color: #fff; } .pell-actionbar{ background-color:#fff;