Changeset 5761
- Timestamp:
- Nov 28, 2019, 9:06:32 AM (3 years ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/resources/index.js
r5740 r5761 228 228 html += '<span class="activity-time">'+Strings.encodeTags(activity.time)+'</span>'; 229 229 html += '<span class="activity-message">' + Strings.encodeTags(activity.message) + '</span>'; 230 if (activity.quoteOfTheDay && activityNo == 0) 231 { 232 html += '<span class="activity-author">' + Strings.encodeTags(activity.author) + '</span>'; 233 html += '<div class="activity-link">'; 234 html += '<a href="https://theysaidso.com" title="Powered by quotes from The Said So" target="_blank" rel="noopener noreferrer">theysaidso.com</a>'; 235 html += '</div>'; 236 } 230 237 html += '</div>'; 238 if (activity.quoteOfTheDay && activityNo == 0) 239 { 240 Doc.element('quote-of-the-day').innerHTML = html; 241 html = ''; 242 } 231 243 } 232 244 Doc.element('activity-log-entries').innerHTML = html; -
extensions/net.sf.basedb.reggie/trunk/resources/index.jsp
r5737 r5761 218 218 } 219 219 220 221 #activity-log .activity.quote-of-the-day 222 { 223 font-style: italic; 224 white-space: normal; 225 text-align: center; 226 margin: 1em 1em 0.5em 0; 227 border-top-width: 1px; 228 border-top-style: dotted; 229 padding-top: 0.5em; 230 } 231 232 #activity-log .activity-author 233 { 234 white-space: nowrap; 235 } 236 237 #activity-log .activity-author:before 238 { 239 content: '–'; 240 padding-left: 0.5em; 241 padding-right: 0.25em; 242 } 243 244 #activity-log .quote-of-the-day .activity-link 245 { 246 text-align: right; 247 border-top-width: 1px; 248 border-top-style: dotted; 249 margin-top: 0.5em; 250 } 251 220 252 #activity-log .activity-time 221 253 { … … 223 255 color: #666666; 224 256 } 257 258 #activity-log .quote-of-the-day .activity-time 259 { 260 display: none; 261 } 262 225 263 #activity-log-rss 226 264 { … … 1229 1267 1230 1268 <div id="activity-log"> 1269 <div id="quote-of-the-day"></div> 1231 1270 <a id="activity-log-rss" href="<%=servletHome%>/ActivityLog.rss" 1232 1271 title="Get the activity log as an RSS feed"><img src="images/rss.png"></a> -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/activity/ActivityLog.java
r5740 r5761 108 108 109 109 private volatile byte[] rssFeed; 110 private volatile QuoteOfTheDay quoteOfTheDay; 110 111 111 112 private ActivityLog() … … 188 189 } 189 190 191 public QuoteOfTheDay getQuoteOfTheDay() 192 { 193 if (quoteOfTheDay == null) 194 { 195 QuoteOfTheDay tmp = new QuoteOfTheDay(); 196 tmp.setAuthor("Indiana Jones - Raiders of the Lost Ark"); 197 tmp.setQuote("There's a big snake in the plane, Jock!"); 198 quoteOfTheDay = tmp; 199 } 200 return quoteOfTheDay; 201 } 190 202 191 203 /** -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/SessionServlet.java
r5740 r5761 29 29 import net.sf.basedb.reggie.activity.ActivityEntry; 30 30 import net.sf.basedb.reggie.activity.ActivityLog; 31 import net.sf.basedb.reggie.activity.QuoteOfTheDay; 31 32 import net.sf.basedb.reggie.converter.DateToStringConverter; 32 33 import net.sf.basedb.reggie.counter.CounterService; … … 155 156 if (!"Today".equals(firstDay)) 156 157 { 157 // Add 'Nothing yet' as first entry of Today158 158 JSONObject jsonActivity = new JSONObject(); 159 jsonActivity.put("day", "Today");160 jsonActivity.put("message", "Nothing yet");161 159 jsonActivity.put("time", toTime.convert(new Date())); 162 jsonActivity.put("subclass", "nothing-yet"); 160 QuoteOfTheDay qod = ActivityLog.getInstance().getQuoteOfTheDay(); 161 if (qod != null) 162 { 163 jsonActivity.put("message", qod.getQuote()); 164 jsonActivity.put("author", qod.getAuthor()); 165 jsonActivity.put("subclass", "quote-of-the-day"); 166 jsonActivity.put("quoteOfTheDay", true); 167 } 168 else 169 { 170 // Add 'Nothing yet' as first entry of Today 171 jsonActivity.put("day", "Today"); 172 jsonActivity.put("message", "Nothing yet"); 173 jsonActivity.put("subclass", "nothing-yet"); 174 } 163 175 jsonActivityLog.add(0, jsonActivity); 164 176 } … … 285 297 } 286 298 287 288 299 }
Note: See TracChangeset
for help on using the changeset viewer.