Merge branch 'Jack-1'
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								__pycache__/dashboard.cpython-310.pyc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								__pycache__/dashboard.cpython-310.pyc
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -22,9 +22,36 @@ function getCSSVariable(name) { | |||||||
|     return getComputedStyle(root).getPropertyValue(name) |     return getComputedStyle(root).getPropertyValue(name) | ||||||
| } | } | ||||||
|  |  | ||||||
| function tweetCell(tweet, parent) { | function tweetCell(tweet) { | ||||||
|     var cell = document.createElement("div"); |     var cell = document.createElement("div"); | ||||||
|     cell.innerHTML = |     cell.innerHTML = | ||||||
|  | <<<<<<< Updated upstream | ||||||
|  |         '<div class="tweet">'+ | ||||||
|  |             '<img src="' + tweet.user.profile_image_url + '" alt="" class="tweet-profilepicture">' + | ||||||
|  |             '<div class="tweet-content">' + | ||||||
|  |                 '<div class="tweet-name">'+ | ||||||
|  |                     '<span class="tweet-nickname">'+tweet.user.name+' </span>'+ | ||||||
|  |                     '<span class="tweet-username">@'+tweet.user.screen_name+'</span>'+ | ||||||
|  |                 '</div>'+ | ||||||
|  |                 '<span class="tweet-text">'+tweet.text+'</span>'+ | ||||||
|  |                 '<div class="tweet-interactions">'+ | ||||||
|  |                     '<div class="tweet-interaction tweet-likes">'+ | ||||||
|  |                         '<span class="material-symbols-outlined">favorite</span>'+ | ||||||
|  |                         '<span>'+tweet.favorite_count+'</span>'+ | ||||||
|  |                     '</div>'+ | ||||||
|  |                     '<div class="tweet-interaction tweet-retweets">'+ | ||||||
|  |                         '<span class="material-symbols-outlined">repeat</span>'+ | ||||||
|  |                         '<span>'+tweet.retweet_count+'</span>'+ | ||||||
|  |                     '</div>'+ | ||||||
|  |                     '<div class="tweet-interaction tweet-replies">'+ | ||||||
|  |                         '<span class="material-symbols-outlined">chat_bubble</span>'+ | ||||||
|  |                         '<span>'+tweet.reply_count+'</span>'+ | ||||||
|  |                     '</div>'+ | ||||||
|  |                 '</div>'+ | ||||||
|  |             '</div>'+ | ||||||
|  |         '</div>'; | ||||||
|  |     parent.append(cell); | ||||||
|  | ======= | ||||||
|     `<div class="tweet"> |     `<div class="tweet"> | ||||||
|         <img src="${tweet.user.profile_image_url}" alt="" class="tweet-profilepicture"> |         <img src="${tweet.user.profile_image_url}" alt="" class="tweet-profilepicture"> | ||||||
|         <div class="tweet-content">  |         <div class="tweet-content">  | ||||||
| @@ -49,59 +76,9 @@ function tweetCell(tweet, parent) { | |||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|     </div>` |     </div>` | ||||||
|     parent.append(cell); |     return cell | ||||||
|  | >>>>>>> Stashed changes | ||||||
| } | } | ||||||
|  |  | ||||||
|  | $(document).on('tweet', console.log(tweet)); | ||||||
|      |      | ||||||
| var atweet = { |  | ||||||
|     "created_at": "Sat Nov 16 12:51:41 +0000 2019", |  | ||||||
|     "text": "@BobGreenburg @ONeill_Coffee Congrats to the excellent football program at Wilmington. One classy organization!", |  | ||||||
|     "source": "<a href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\">Twitter for iPhone<\/a>", |  | ||||||
|     "user": { |  | ||||||
|         "name": "Express Youngstown", |  | ||||||
|         "screen_name": "ExpressProsYO", |  | ||||||
|         "url": "http:\/\/apply.expresspros.com\/", |  | ||||||
|         "profile_image_url": "http:\/\/pbs.twimg.com\/profile_images\/775167844921188353\/fWquHsOK_normal.jpg", |  | ||||||
|     }, |  | ||||||
|     "quote_count": 0, |  | ||||||
|     "reply_count": 0, |  | ||||||
|     "retweet_count": 0, |  | ||||||
|     "favorite_count": 0, |  | ||||||
|     "entities": { |  | ||||||
|         "hashtags": [ |  | ||||||
|  |  | ||||||
|         ], |  | ||||||
|         "urls": [ |  | ||||||
|  |  | ||||||
|         ], |  | ||||||
|         "user_mentions": [ |  | ||||||
|             { |  | ||||||
|                 "screen_name": "BobGreenburg", |  | ||||||
|                 "name": "Bob Greenburg", |  | ||||||
|                 "id": 483881032, |  | ||||||
|                 "id_str": "483881032", |  | ||||||
|                 "indices": [ |  | ||||||
|                     0, |  | ||||||
|                     13 |  | ||||||
|                 ] |  | ||||||
|             }, |  | ||||||
|             { |  | ||||||
|                 "screen_name": "ONeill_Coffee", |  | ||||||
|                 "name": "O'NeillCoffeeCompany", |  | ||||||
|                 "id": 2804543925, |  | ||||||
|                 "id_str": "2804543925", |  | ||||||
|                 "indices": [ |  | ||||||
|                     14, |  | ||||||
|                     28 |  | ||||||
|                 ] |  | ||||||
|             } |  | ||||||
|         ], |  | ||||||
|         "symbols": [ |  | ||||||
|  |  | ||||||
|         ] |  | ||||||
|     }, |  | ||||||
| } |  | ||||||
|  |  | ||||||
| for (let i = 0; i < 2; i++) { |  | ||||||
|     tweetCell(atweet, $(".leftcol")); |  | ||||||
| } |  | ||||||
| @@ -68,26 +68,21 @@ var process_entities = function(message, entities) { | |||||||
|  |  | ||||||
| block.fn.tweets = function(config) { | block.fn.tweets = function(config) { | ||||||
|     var options = $.extend({ |     var options = $.extend({ | ||||||
|         memory: 20 |         memory: 100 | ||||||
|     }, config); |     }, config); | ||||||
|  |  | ||||||
|  | <<<<<<< Updated upstream:template_static/lib/tweets.js | ||||||
|     // create the necessary HTML in the block container |     // create the necessary HTML in the block container | ||||||
|     this.$element.append('<ol class="tweet-list stream-items"></ol>'); |     //this.$element.append('<ol class="tweet-list stream-items"></ol>'); | ||||||
|  |  | ||||||
|  | ======= | ||||||
|  | >>>>>>> Stashed changes:dashboard_static/lib/tweets.js | ||||||
|     // store list for later |     // store list for later | ||||||
|     var $list = this.$element.find('ol'); |     var $list = $("div.tweetcontainer"); | ||||||
|  |  | ||||||
|  |  | ||||||
|     // register default handler for handling tweet data |     // register default handler for handling tweet data | ||||||
|     this.actions(function(e, tweet){ |     this.actions(function(e, tweet){ | ||||||
|         tweets = window.sessionStorage.getItem('tweets'); | <<<<<<< Updated upstream:template_static/lib/tweets.js | ||||||
|         tweets = JSON.parse(tweets); |  | ||||||
|         tweets.push(tweet); |  | ||||||
|         if(tweets.length >= options.memory) { |  | ||||||
|             tweets.shift(); |  | ||||||
|         } |  | ||||||
|         window.sessionStorage.setItem('tweets', JSON.stringify(tweets)); |  | ||||||
|  |  | ||||||
|         var $item = $('<li class="stream-item"></li>'); |         var $item = $('<li class="stream-item"></li>'); | ||||||
|  |  | ||||||
|         var $tweet = $('<div class="tweet"></div>'); |         var $tweet = $('<div class="tweet"></div>'); | ||||||
| @@ -123,6 +118,17 @@ block.fn.tweets = function(config) { | |||||||
|         $item.append($tweet); |         $item.append($tweet); | ||||||
|          |          | ||||||
|         // place new tweet in front of list  |         // place new tweet in front of list  | ||||||
|  | ======= | ||||||
|  |         tweets = window.sessionStorage.getItem('tweets'); | ||||||
|  |         tweets = JSON.parse(tweets); | ||||||
|  |         tweets.push(tweet); | ||||||
|  |         if(tweets.length >= options.memory) { | ||||||
|  |             tweets.shift(); | ||||||
|  |         } | ||||||
|  |         window.sessionStorage.setItem('tweets', JSON.stringify(tweets)); | ||||||
|  |  | ||||||
|  |         var $item = tweetCell(tweet) | ||||||
|  | >>>>>>> Stashed changes:dashboard_static/lib/tweets.js | ||||||
|         $list.prepend($item); |         $list.prepend($item); | ||||||
|  |  | ||||||
|         // remove stale tweets |         // remove stale tweets | ||||||
|   | |||||||
							
								
								
									
										
											BIN
										
									
								
								eca/__pycache__/arff.cpython-310.pyc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								eca/__pycache__/arff.cpython-310.pyc
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								eca/__pycache__/generators.cpython-310.pyc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								eca/__pycache__/generators.cpython-310.pyc
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user
	 jacktjong
					jacktjong