update readme and misc tweaks

This commit is contained in:
Timothy Warren 2012-09-13 15:07:31 +00:00
parent ba319c711d
commit 932de6853f
4 changed files with 58 additions and 41 deletions

View File

@ -20,3 +20,11 @@ Meta has a four-level hierarchy
This basic hierarchy enables keeping track of simple data in a neat fashion. This basic hierarchy enables keeping track of simple data in a neat fashion.
### Requirements
* PHP 5.3+
* SQLite, MySQL, Postgres, or Firebird Database
* PHP Multibyte extension
* Browser:
* Internet Explorer 9+, Chrome, Safari, Firefox, or Opera

View File

@ -64,7 +64,12 @@ $path_from = './images/';
| The path fragment replacement for the css files | The path fragment replacement for the css files
| |
*/ */
$path_to = '//github.timshomepage.net/meta/assets/images/'; $sn = $_SERVER['SCRIPT_NAME'];
$sna = explode('/', $sn);
array_pop($sna);
$sn = implode('/', $sna);
$path_to = "//{$_SERVER['SERVER_NAME']}{$sn}/images/";
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@ -14,6 +14,7 @@ html, body {
} }
button { button {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color:#312; color:#312;
padding:0.25em; padding:0.25em;
border:1px solid #888; border:1px solid #888;
@ -25,7 +26,7 @@ button {
a, a:visited { a, a:visited {
text-decoration:none; text-decoration:none;
color:#558BFF; color:#1147BB;
} }
a:hover { a:hover {
@ -47,7 +48,6 @@ h1,h2 {
} }
ul { ul {
/*padding:auto;*/
padding-left:2.5em; padding-left:2.5em;
margin:0; margin:0;
} }
@ -57,10 +57,13 @@ li {
} }
dd { dd {
/*margin:auto;*/
margin-left:0.5em; margin-left:0.5em;
} }
fieldset {
border-radius:5px;
}
/* Hide forms by default */ /* Hide forms by default */
fieldset dl { fieldset dl {
display:none; display:none;
@ -103,25 +106,30 @@ li:hover > .modify, dt:hover > .modify {
} }
button.save { button.save {
background:#797; background:#7c7;
background:-o-linear-gradient(#797, #595); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#77cc77', EndColorStr='#559955')"; /* IE9 */
background:-moz-linear-gradient(#797, #595); background:-o-linear-gradient(#7c7, #595);
background:-webkit-linear-gradient(#797, #595); background:-ms-linear-gradient(#7c7, #595);
background:linear-gradient(#797, #595); background:-moz-linear-gradient(#7c7, #595);
background:-webkit-linear-gradient(#7c7, #595);
background:linear-gradient(#7c7, #595);
color:#fff; color:#fff;
} }
button.save:hover { button.save:hover {
background:#595; background:#595;
background:-o-linear-gradient(#595, #797); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#559955', EndColorStr='#77cc77')"; /* IE9 */
background:-moz-linear-gradient(#595, #797); background:-o-linear-gradient(#595, #7c7);
background:-webkit-linear-gradient(#595, #797); background:-moz-linear-gradient(#595, #7c7);
background:linear-gradient(#595, #797); background:-webkit-linear-gradient(#595, #7c7);
background:linear-gradient(#595, #7c7);
} }
button.edit { button.edit {
background:#fff; background:#fff;
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffffff', EndColorStr='#dddddd')"; /* IE9 */
background:-o-linear-gradient(#fff, #ddd); background:-o-linear-gradient(#fff, #ddd);
background:-ms-linear-gradient(#fff, #ddd);
background:-moz-linear-gradient(#fff, #ddd); background:-moz-linear-gradient(#fff, #ddd);
background:-webkit-linear-gradient(#fff, #ddd); background:-webkit-linear-gradient(#fff, #ddd);
background:linear-gradient(#fff, #ddd); background:linear-gradient(#fff, #ddd);
@ -129,7 +137,9 @@ button.edit {
button.edit:hover { button.edit:hover {
background:#ddd; background:#ddd;
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#dddddd', EndColorStr='#ffffff')"; /* IE9 */
background:-o-linear-gradient(#ddd, #fff); background:-o-linear-gradient(#ddd, #fff);
background:-ms-linear-gradient(#ddd, #fff);
background:-moz-linear-gradient(#ddd, #fff); background:-moz-linear-gradient(#ddd, #fff);
background:-webkit-linear-gradient(#ddd, #fff); background:-webkit-linear-gradient(#ddd, #fff);
background:linear-gradient(#ddd, #fff); background:linear-gradient(#ddd, #fff);
@ -137,7 +147,9 @@ button.edit:hover {
button.delete { button.delete {
background:#f55; background:#f55;
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#ff5555', EndColorStr='#995555')"; /* IE9 */
background:-o-linear-gradient(#f55, #955); background:-o-linear-gradient(#f55, #955);
background:-ms-linear-gradient(#f55, #955);
background:-moz-linear-gradient(#f55, #955); background:-moz-linear-gradient(#f55, #955);
background:-webkit-linear-gradient(#f55, #955); background:-webkit-linear-gradient(#f55, #955);
background:linear-gradient(#f55, #955); background:linear-gradient(#f55, #955);
@ -146,7 +158,9 @@ button.delete {
button.delete:hover { button.delete:hover {
background:#955; background:#955;
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#995555', EndColorStr='#ff5555')"; /* IE9 */
background:-o-linear-gradient(#955, #f55); background:-o-linear-gradient(#955, #f55);
background:-ms-linear-gradient(#955, #f55);
background:-moz-linear-gradient(#955, #f55); background:-moz-linear-gradient(#955, #f55);
background:-webkit-linear-gradient(#955, #f55); background:-webkit-linear-gradient(#955, #f55);
background:linear-gradient(#955, #f55); background:linear-gradient(#955, #f55);
@ -219,7 +233,7 @@ dl.pair dd {
/* ! Form overlay styles */ /* ! Form overlay styles */
#overlay_bg { #overlay_bg {
background:#777; background:#777;
background:rgba(105,105,220,0.85); background:rgba(85,105,255,0.85);
position:fixed; position:fixed;
display:none; display:none;
width:900%; width:900%;
@ -232,11 +246,6 @@ dl.pair dd {
#overlay { #overlay {
position:absolute; position:absolute;
background:#ddd; background:#ddd;
/*background:rgba(255,255,255,0.85);
top:25%;
left:25%;
width:600px;
height:auto;*/
min-width:700px; min-width:700px;
padding:0.5em; padding:0.5em;
border-radius:5px; border-radius:5px;

View File

@ -70,26 +70,6 @@ $_.ext('center', function (sel){
var meta = {}; var meta = {};
window.meta = meta; window.meta = meta;
/**
* Ajax callback for deletion of an item
*/
meta._delete = function(res){
if (res == 1)
{
// Reload the page
window.location = window.location;
}
else
{
$_.get(APP_URL+'message', {
type: 'error',
message: 'There was an error deleting that item'
}, function(h) {
$_('body').dom.prepend(h);
});
}
};
/** /**
* Deletes a genre/category/section/data item * Deletes a genre/category/section/data item
* based on the current page context * based on the current page context
@ -120,7 +100,22 @@ $_.ext('center', function (sel){
case "category": case "category":
case "section": case "section":
case "data": case "data":
$_.post(APP_URL+'delete', {'id':id, 'type':type}, meta._delete); $_.post(APP_URL+'delete', {'id':id, 'type':type}, function(res){
if (res == 1)
{
// Reload the page
window.location = window.location;
}
else
{
$_.get(APP_URL+'message', {
type: 'error',
message: 'There was an error deleting that item'
}, function(h) {
$_('body').dom.prepend(h);
});
}
});
break; break;
default: default: