{"id":1347744,"date":"2017-09-11T14:32:41","date_gmt":"2017-09-11T21:32:41","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-tribe-events-week-js\/"},"modified":"2017-09-11T14:34:13","modified_gmt":"2017-09-11T21:34:13","slug":"extending-tribe-events-week-js","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-tribe-events-week-js\/","title":{"rendered":"Extending tribe-events-week.js?"},"content":{"rendered":"<p>I have events that start at :15 and :45 minutes of the hour.  This isn&#8217;t a problem unless there is another event right after it.<\/p>\n<p>With a 15 minute event, the space allocated to it should only be 15px (they are using 1px per minute in the code&#8230; Nice but that means a 15 minute event will get padded to a div element of 36px after it increases the title to 20px and adds the padding of 16px. <\/p>\n<p>I&#8217;ve followed the Themer&#8217;s Guide down to the week\/tooltip.php template.  That&#8217;s when I determined the output of the file was then being processed by the javascript funtion tribe_display_week_view() in events-calendar-pro\/src\/resources\/js\/tribe-events-week.js<\/p>\n<p>Is there a way to replace\/extend that js function without completely overwriting the file.  Essentially, I need to adjust it&#8217;s calculations from 1px per minute to 2px per hour so I can fit 15 minute events in correctly.<\/p>\n<p>BTW: I&#8217;ve already figured out the CSS adjustments to the week view<\/p>\n<pre><code>\/\/ set 30 minute marks to 2px per minute\n.tribe-week-grid-block div{\n  height:60px;\n}\n\n\/\/ set 60 minute marks to 2px per minute\n.tribe-events-grid .column.first div, .tribe-week-grid-hours div, .tribe-week-grid-block {\n  height:120px;\n}<\/code><\/pre>\n<p>Hopefully you can point me in some direction other than your list of custom developers.<\/p>\n","protected":false},"template":"","class_list":["post-1347744","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Extending tribe-events-week.js? -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-tribe-events-week-js\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Extending tribe-events-week.js? -\" \/>\n<meta property=\"og:description\" content=\"I have events that start at :15 and :45 minutes of the hour. This isn&#8217;t a problem unless there is another event right after it. With a 15 minute event, the space allocated to it should only be 15px (they are using 1px per minute in the code&#8230; Nice but that means a 15 minute [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-tribe-events-week-js\/\" \/>\n<meta property=\"article:modified_time\" content=\"2017-09-11T21:34:13+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-tribe-events-week-js\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-tribe-events-week-js\/\",\"name\":\"Extending tribe-events-week.js? -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-09-11T21:32:41+00:00\",\"dateModified\":\"2017-09-11T21:34:13+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-tribe-events-week-js\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-tribe-events-week-js\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-tribe-events-week-js\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Extending tribe-events-week.js?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Extending tribe-events-week.js? -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-tribe-events-week-js\/","og_locale":"en_US","og_type":"article","og_title":"Extending tribe-events-week.js? -","og_description":"I have events that start at :15 and :45 minutes of the hour. This isn&#8217;t a problem unless there is another event right after it. With a 15 minute event, the space allocated to it should only be 15px (they are using 1px per minute in the code&#8230; Nice but that means a 15 minute [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-tribe-events-week-js\/","article_modified_time":"2017-09-11T21:34:13+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-tribe-events-week-js\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-tribe-events-week-js\/","name":"Extending tribe-events-week.js? -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-09-11T21:32:41+00:00","dateModified":"2017-09-11T21:34:13+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-tribe-events-week-js\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-tribe-events-week-js\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-tribe-events-week-js\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Extending tribe-events-week.js?"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1347744","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":2,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1347744\/revisions"}],"predecessor-version":[{"id":1349132,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1347744\/revisions\/1349132"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1347744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}