whitespace consistency
This commit is contained in:
parent
d3c921e8f3
commit
7e303dc73d
@ -25,11 +25,11 @@ class Blotter extends SimpleExtension {
|
||||
* Installer
|
||||
*/
|
||||
global $database, $config;
|
||||
$database->create_table("blotter",
|
||||
"id SCORE_AIPK
|
||||
, entry_date SCORE_DATETIME DEFAULT SCORE_NOW
|
||||
, entry_text TEXT NOT NULL
|
||||
, important SCORE_BOOL NOT NULL DEFAULT SCORE_BOOL_N
|
||||
$database->create_table("blotter", "
|
||||
id SCORE_AIPK,
|
||||
entry_date SCORE_DATETIME DEFAULT SCORE_NOW,
|
||||
entry_text TEXT NOT NULL,
|
||||
important SCORE_BOOL NOT NULL DEFAULT SCORE_BOOL_N
|
||||
");
|
||||
// Insert sample data:
|
||||
$database->execute("INSERT INTO blotter (id, entry_date, entry_text, important) VALUES (?, now(), ?, ?)",
|
||||
@ -99,7 +99,7 @@ class Blotter extends SimpleExtension {
|
||||
if(!$user->is_admin()) {
|
||||
$this->theme->display_permission_denied($page);
|
||||
} else {
|
||||
$id = $_POST['id'];
|
||||
$id = int_escape($_POST['id']);
|
||||
if(!isset($id)) { die("No ID!"); }
|
||||
$database->Execute("DELETE FROM blotter WHERE id=$id");
|
||||
log_info("blotter", "Removed Entry #$id");
|
||||
@ -122,6 +122,7 @@ class Blotter extends SimpleExtension {
|
||||
*/
|
||||
$this->display_blotter();
|
||||
}
|
||||
|
||||
private function display_blotter() {
|
||||
global $database, $config;
|
||||
$limit = $config->get_int("blotter_recent", 5);
|
||||
@ -129,3 +130,4 @@ class Blotter extends SimpleExtension {
|
||||
$this->theme->display_blotter($entries);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
class BlotterTheme extends Themelet {
|
||||
public function display_editor($entries) {
|
||||
global $page;
|
||||
@ -132,13 +132,11 @@ class BlotterTheme extends Themelet {
|
||||
$i_color = $config->get_string("blotter_color","#FF0000");
|
||||
$position = $config->get_string("blotter_position", "subheading");
|
||||
$html = "<style type='text/css'>
|
||||
#blotter1 {font-size: 80%;
|
||||
position: relative;}
|
||||
#blotter2 {font-size: 80%;
|
||||
}
|
||||
</style>";
|
||||
#blotter1 {font-size: 80%; position: relative;}
|
||||
#blotter2 {font-size: 80%;}
|
||||
</style>";
|
||||
$html .= "<script><!--
|
||||
$(document).ready(function() {
|
||||
$(document).ready(function() {
|
||||
$(\"#blotter2-toggle\").click(function() {
|
||||
$(\"#blotter2\").slideToggle(\"slow\", function() {
|
||||
if($(\"#blotter2\").is(\":hidden\")) {
|
||||
@ -152,8 +150,8 @@ class BlotterTheme extends Themelet {
|
||||
if($.cookie(\"blotter2-hidden\") == 'true') {
|
||||
$(\"#blotter2\").hide();
|
||||
}
|
||||
});
|
||||
//--></script>";
|
||||
});
|
||||
//--></script>";
|
||||
$entries_list = "";
|
||||
for ($i = 0 ; $i < count($entries) ; $i++)
|
||||
{
|
||||
@ -175,7 +173,7 @@ class BlotterTheme extends Themelet {
|
||||
$pos_break = "";
|
||||
$pos_align = "text-align: right; position: absolute; right: 0px;";
|
||||
if($position == "left") { $pos_break = "<br />"; $pos_align = ""; }
|
||||
if (count($entries) == 0) { $out_text = "No blotter entries yet."; $in_text = "Empty.";}
|
||||
if(count($entries) == 0) { $out_text = "No blotter entries yet."; $in_text = "Empty.";}
|
||||
else { $clean_date = date("m/d/y",strtotime($entries[0]['entry_date']));
|
||||
$out_text = "Blotter updated: {$clean_date}";
|
||||
$in_text = "<ul>$entries_list</ul>";
|
||||
|
Loading…
x
Reference in New Issue
Block a user