1"use strict"; 2 3var filterApp; 4var recentNewsApp; 5var stickyNewsApp; 6var eventsApp; 7 8var countdownInterval; 9 10window.addEventListener('load', function () { 11 12 filterApp = new Vue({ 13 el: '#filterResultBox', 14 data: { 15 posts : [], 16 loadListings: false, 17 filter: [] 18 }, 19 methods: { 20 pushNewData: function (newData) { 21 this.posts.push(newData); 22 setTimeout(function () { 23 filterApp.loadListings = false; 24 }, 300); 25 } 26 } 27 }); 28 29 /*recentNewsApp = new Vue({ 30 el: '#stm_widget_recent_news', 31 data: { 32 posts : [], 33 selectedCategory: 'all', 34 showNews: false, 35 showCats: false 36 }, 37 created: function () { 38 this.getPosts('all'); 39 }, 40 methods: { 41 getPosts: function (category) { 42 this.selectedCategory = category; 43 this.showCats = false; 44 45 var ajaxData = document.getElementById('stm_widget_recent_news').getAttribute('data-link'); 46 47 this.$http.get(stm_ajaxurl + ajaxData + '&category=' + category).then(function(response){ 48 this.showNews = false; 49 this.posts = response.data; 50 setTimeout(function () { 51 recentNewsApp.showNews = true; 52 }, 200); 53 }); 54 }, 55 showHideCategs: function() { 56 this.showCats = (this.showCats) ? false : true; 57 } 58 } 59 }); 60 61 stickyNewsApp = new Vue({ 62 el: '#features_posts_wrap', 63 data: { 64 posts: [], 65 bigPost: {}, 66 miniPosts: [], 67 hidenPosts: [], 68 categs: [], 69 slugs: [], 70 postsPerPage: 4, 71 selectedCategory: 'all', 72 showHiden: false, 73 loadCategory: true 74 }, 75 created: function () { 76 this.getPosts('all'); 77 }, 78 methods: { 79 getPosts: function (category) { 80 81 this.selectedCategory = category; 82 83 var ajaxData = document.getElementById('features_posts_wrap').getAttribute('data-params'); 84 85 this.$http.get(stm_ajaxurl + ajaxData + '&category=' + category).then(function(response){ 86 this.posts = response.data; 87 this.bigPost = {}; 88 this.miniPosts = []; 89 this.hidenPosts = []; 90 this.runParsePosts(); 91 }); 92 }, 93 94 runParsePosts: function () { 95 this.bigPost = this.posts[0]; 96 var hidePosition = document.getElementById('features_posts_wrap').getAttribute('data-hide-position'); 97 this.pushCategory(this.posts[0].category, this.posts[0].cat_slug); 98 for(var q=1;q<this.posts.length;q++) { 99 this.pushCategory(this.posts[q].category, this.posts[q].cat_slug); 100 if(q <= hidePosition) this.miniPosts.push(this.posts[q]); 101 else this.hidenPosts.push(this.posts[q]); 102 } 103 104 this.loadCategory = false; 105 }, 106 107 pushCategory: function (cat, slug) { 108 if(cat != '' && this.loadCategory) { 109 this.categs.push(cat); 110 this.slugs.push(slug); 111 } 112 }, 113 114 showHide: function () { 115 if(this.showHiden) { 116 this.showHiden = false; 117 } else { 118 this.showHiden = true; 119 } 120 } 121 } 122 }); 123 124 eventsApp = new Vue({ 125 el: '#eventsMiddle', 126 data: { 127 posts: [], 128 postPrev: {}, 129 showPreview: true, 130 active: '' 131 }, 132 created: function () { 133 this.getEvents(); 134 }, 135 methods: { 136 getEvents: function() { 137 var ajaxData = document.getElementById('eventsMiddle').getAttribute('data-params'); 138 139 this.$http.get(stm_ajaxurl + ajaxData).then(function(response){ 140 this.posts = response.data; 141 this.setPreviewPost(0); 142 }); 143 }, 144 setPreviewPost: function (position) { 145 this.showPreview = false;
146 this.postPrev = this.posts[position]; 147 this.active = position; 148 149 if(countdownInterval) clearInterval(countdownInterval); 150 151 setTimeout(function() { 152 countdownInterval = setInterval(function () { 153 window.dateCountdown(); 154 }, 1000); 155 eventsApp.showPreview = true; 156 157 }, 200); 158 159 160 } 161 } 162 });*/ 163});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.