diff --git a/app/classes/controller.php b/app/classes/controller.php
index 6972490..84dd925 100644
--- a/app/classes/controller.php
+++ b/app/classes/controller.php
@@ -28,7 +28,7 @@ abstract class Controller extends \miniMVC\Controller {
public function __construct()
{
parent::__construct();
- $this->load_model('meta\model');
+ $this->load_model('meta\data_model');
$this->load_model('meta\user_model');
$this->session =& \miniMVC\Session::get_instance();
@@ -58,7 +58,7 @@ abstract class Controller extends \miniMVC\Controller {
*/
public function __destruct()
{
- $this->page->set_foot_js_group('js');
+ $this->page->set_foot_js_group('js', TRUE);
$this->page->build_footer();
}
diff --git a/app/config/routes.php b/app/config/routes.php
index adcd071..0e42238 100644
--- a/app/config/routes.php
+++ b/app/config/routes.php
@@ -29,10 +29,12 @@
// --------------------------------------------------------------------------
-return [
+return array(
// Default Paths
'default_controller' => 'welcome',
'default_module' => 'meta',
+ 'delete' => 'meta/welcome/delete',
+ 'update' => 'meta/welcome/update_item',
'genre' => 'meta/genre/index',
'genre/add' => 'meta/genre/add',
'genre/add_category' => 'meta/genre/add_category',
@@ -41,6 +43,6 @@ return [
'section' => 'meta/section/index',
'section/add_data' => 'meta/section/add_data',
'404_route' => '',
-];
+);
// End of routes.php
\ No newline at end of file
diff --git a/app/modules/meta/controllers/category.php b/app/modules/meta/controllers/category.php
index 4a05575..f461ae5 100644
--- a/app/modules/meta/controllers/category.php
+++ b/app/modules/meta/controllers/category.php
@@ -44,9 +44,9 @@ class category extends meta\controller {
}
$data = array(
- 'category' => $this->model->get_category_by_id($id),
- 'sections' => $this->model->get_category_outline_data($id),
- 'genre' => $this->model->get_genre_by_category($id),
+ 'category' => $this->data_model->get_category_by_id($id),
+ 'sections' => $this->data_model->get_category_outline_data($id),
+ 'genre' => $this->data_model->get_genre_by_category($id),
'category_id' => $id
);
@@ -63,7 +63,7 @@ class category extends meta\controller {
$id = (int) $_POST['category_id'];
// Make sure the name doesn't already exist. If it does, show an error.
- $res = $this->model->add_section($name, $id);
+ $res = $this->data_model->add_section($name, $id);
if ($res === TRUE)
{
diff --git a/app/modules/meta/controllers/genre.php b/app/modules/meta/controllers/genre.php
index 144460e..ba35019 100644
--- a/app/modules/meta/controllers/genre.php
+++ b/app/modules/meta/controllers/genre.php
@@ -44,7 +44,7 @@ class genre extends meta\controller {
{
// Otherwise, display list of genres
$data = array();
- $data['genres'] = $this->model->get_genres();
+ $data['genres'] = $this->data_model->get_genres();
$this->load_view('genres', $data);
@@ -63,7 +63,7 @@ class genre extends meta\controller {
$name = strip_tags($_POST['genre']);
// Make sure the name doesn't already exist. If it does, show an error.
- $res = $this->model->add_genre($name);
+ $res = $this->data_model->add_genre($name);
if ($res === TRUE)
{
@@ -85,8 +85,8 @@ class genre extends meta\controller {
*/
public function detail($id)
{
- $genre = $this->model->get_genre_by_id($id);
- $categories = $this->model->get_categories($id);
+ $genre = $this->data_model->get_genre_by_id($id);
+ $categories = $this->data_model->get_categories($id);
$data = array(
'genre' => $genre,
@@ -107,7 +107,7 @@ class genre extends meta\controller {
$id = (int) $_POST['genre_id'];
// Make sure the name doesn't already exist. If it does, show an error.
- $res = $this->model->add_category($name, $id);
+ $res = $this->data_model->add_category($name, $id);
if ($res === TRUE)
{
diff --git a/app/modules/meta/controllers/section.php b/app/modules/meta/controllers/section.php
index f13a59d..ec7dc8d 100644
--- a/app/modules/meta/controllers/section.php
+++ b/app/modules/meta/controllers/section.php
@@ -44,9 +44,9 @@ class section extends meta\controller {
}
$data = array(
- 'section' => $this->model->get_section_by_id($id),
- 'sdata' => $this->model->get_data($id),
- 'p' => $this->model->get_path_by_section($id),
+ 'section' => $this->data_model->get_section_by_id($id),
+ 'sdata' => $this->data_model->get_data($id),
+ 'p' => $this->data_model->get_path_by_section($id),
'section_id' => $id
);
@@ -70,7 +70,7 @@ class section extends meta\controller {
$data = array_combine($keys, $vals);
- $res = $this->model->add_data($section_id, $data);
+ $res = $this->data_model->add_data($section_id, $data);
($res)
diff --git a/app/modules/meta/controllers/welcome.php b/app/modules/meta/controllers/welcome.php
index 6370827..e3619ee 100644
--- a/app/modules/meta/controllers/welcome.php
+++ b/app/modules/meta/controllers/welcome.php
@@ -40,9 +40,9 @@ class welcome extends \meta\controller {
public function index()
{
$data = array();
- $data['genres'] = $this->model->get_genres();
+ $data['genres'] = $this->data_model->get_genres();
- $this->page->render('genres', $data);
+ $this->load_view('genres', $data);
}
// --------------------------------------------------------------------------
@@ -52,7 +52,7 @@ class welcome extends \meta\controller {
*/
public function login()
{
- $this->page->render('login');
+ $this->load_view('login');
}
// --------------------------------------------------------------------------
@@ -72,8 +72,95 @@ class welcome extends \meta\controller {
*/
public function outline()
{
- $outline_data = $this->model->get_outline_data();
- $this->page->render('outline', array('outline' => $outline_data));
+ $outline_data = $this->data_model->get_outline_data();
+ $this->load_view('outline', array('outline' => $outline_data));
+ }
+
+ // --------------------------------------------------------------------------
+
+ /**
+ * Get a message for ajax insertion
+ */
+ public function message()
+ {
+ $type = strip_tags($_GET['type']);
+ $message = $_GET['message'];
+
+ $this->page->set_output(
+ $this->page->set_message($type, $message, TRUE)
+ );
+ }
+
+ // --------------------------------------------------------------------------
+
+ public function delete()
+ {
+ $type = strip_tags($_POST['type']);
+
+ switch($type)
+ {
+ case "genre":
+ case "category":
+ case "section":
+ case "data":
+ $res = (int) $this->data_model->delete($type, (int) $_POST['id']);
+ break;
+
+ default:
+ $res = 0;
+ break;
+ }
+ die(trim($res));
+ }
+
+ // --------------------------------------------------------------------------
+
+ public function edit()
+ {
+ $type = strip_tags($_GET['type']);
+ $id = (int) $_GET['id'];
+
+ if ($this->data_model->is_valid_type($type))
+ {
+ $data = call_user_func(array($this->data_model, "get_{$type}_by_id"), $id);
+
+ $form_array = array(
+ 'name' => is_array($data) ? $data['key'] : "",
+ 'val' => is_array($data) ? $data['value'] : $data,
+ 'type' => $type,
+ 'id' => $id
+ );
+
+ exit($this->load_view('edit_form', $form_array, TRUE));
+ }
+ }
+
+ // --------------------------------------------------------------------------
+
+ public function update_item()
+ {
+ $id = (int) $_POST['id'];
+ $type = strip_tags($_POST['type']);
+ $name = strip_tags($_POST['name']);
+ $val = (isset($_POST['val'])) ? $_POST['val'] : NULL;
+
+ if ($this->data_model->is_valid_type($type))
+ {
+ if ($type != 'data')
+ {
+ $res = $this->data_model->update($type, $id, $name);
+ }
+ else
+ {
+ $res = $this->data_model->update_data($id, $name, $val);
+ }
+
+ $res = (int) $res;
+
+ exit(trim($res));
+ }
+
+ exit(0);
}
}
diff --git a/app/modules/meta/models/model.php b/app/modules/meta/models/data_model.php
similarity index 91%
rename from app/modules/meta/models/model.php
rename to app/modules/meta/models/data_model.php
index 1c868c2..0d8041c 100644
--- a/app/modules/meta/models/model.php
+++ b/app/modules/meta/models/data_model.php
@@ -20,7 +20,7 @@ namespace meta;
*
* @package meta
*/
-class model extends \miniMVC\Model {
+class data_model extends \miniMVC\Model {
/**
* Reference to database connection
@@ -56,11 +56,21 @@ class model extends \miniMVC\Model {
*
* @param string $type
* @param int $id
+ * @return bool
*/
public function delete($type, $id)
{
- $this->db->where('id', (int) $id)
- ->delete($type);
+ try
+ {
+ $this->db->where('id', (int) $id)
+ ->delete($type);
+ }
+ catch (\PDOException $e)
+ {
+ return FALSE;
+ }
+
+ return TRUE;
}
// --------------------------------------------------------------------------
@@ -89,6 +99,54 @@ class model extends \miniMVC\Model {
// --------------------------------------------------------------------------
+ /**
+ * Rename a genre/category/section
+ *
+ * @param string
+ * @param int
+ * @param string
+ * @return bool
+ */
+ public function update($type, $id, $name)
+ {
+ $query = $this->db->set($type, $name)
+ ->where('id', (int) $id)
+ ->update($type);
+
+ return ( ! empty($query)) ;
+ }
+
+ // --------------------------------------------------------------------------
+
+ /**
+ * Update the data
+ *
+ * @param int
+ * @param string
+ * @param string
+ * @return bool
+ */
+ public function update_data($data_id, $key, $val)
+ {
+ try{
+ // Save the data
+ $this->db->set('key', $key)
+ ->set('value', $val)
+ ->where('id', (int) $data_id)
+ ->update('data');
+ }
+ catch(\PDOException $e)
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+ }
+
+ // --------------------------------------------------------------------------
+ // ! Adding data
+ // --------------------------------------------------------------------------
+
/**
* Add genre
*
@@ -216,41 +274,7 @@ class model extends \miniMVC\Model {
return TRUE;
}
- // --------------------------------------------------------------------------
- /**
- * Rename a genre/category/section
- *
- * @param string
- * @param int
- * @param string
- */
- public function update($type, $id, $name)
- {
- $this->db->set($type, $name)
- ->where('id', (int) $id)
- ->update($type);
- }
-
- // --------------------------------------------------------------------------
-
- /**
- * Update the data
- *
- * @param int
- * @param string
- * @param string
- */
- public function update_data($data_id, $key, $val)
- {
-
- // Save the data
- $this->db->set('key', $key)
- ->set('value', $val)
- ->where('id', (int) $data_id)
- ->update('data');
-
- }
// --------------------------------------------------------------------------
// ! Data Retrieval
@@ -401,6 +425,26 @@ class model extends \miniMVC\Model {
// --------------------------------------------------------------------------
+ /**
+ * Gets the data for the specified id
+ *
+ * @param int $id
+ * @return array
+ */
+ public function get_data_by_id($id)
+ {
+ $query = $this->db->select('key, value')
+ ->from('data')
+ ->where('id', (int) $id)
+ ->get();
+
+ $row = $query->fetch(\PDO::FETCH_ASSOC);
+
+ return $row;
+ }
+
+ // --------------------------------------------------------------------------
+
/**
* Get the categories for the specified genre
*
@@ -468,7 +512,7 @@ class model extends \miniMVC\Model {
while($row = $query->fetch(\PDO::FETCH_ASSOC))
{
- $data[$row['id']] = array($row['key'] => str_replace("\n", " ", $row['value']));
+ $data[$row['id']] = array($row['key'] => $row['value']);
}
return $data;
@@ -507,7 +551,7 @@ class model extends \miniMVC\Model {
while($row = $d_query->fetch(\PDO::FETCH_ASSOC))
{
- $d_array[$row['section_id']][$row['key']] = str_replace("\n", " ", $row['value']);
+ $d_array[$row['section_id']][$row['key']] = $row['value'];
}
}
@@ -594,11 +638,11 @@ class model extends \miniMVC\Model {
return $return;
}
-
+
// --------------------------------------------------------------------------
// ! Miscellaneous methods
// --------------------------------------------------------------------------
-
+
/**
* Check if a valid type for editing
*
@@ -610,10 +654,10 @@ class model extends \miniMVC\Model {
$valid = array(
'genre','category','section','data'
);
-
- return in_array(str_to_lower($str), $valid);
+
+ return in_array(strtolower($str), $valid);
}
}
-// End of model.php
\ No newline at end of file
+// End of data_model.php
\ No newline at end of file
diff --git a/app/modules/meta/views/category_detail.php b/app/modules/meta/views/category_detail.php
index 2415262..e44b3bc 100644
--- a/app/modules/meta/views/category_detail.php
+++ b/app/modules/meta/views/category_detail.php
@@ -36,7 +36,6 @@
= $k ?>
-
= $v ?>
diff --git a/app/modules/meta/views/edit_form.php b/app/modules/meta/views/edit_form.php
index 827117e..31c8ed0 100644
--- a/app/modules/meta/views/edit_form.php
+++ b/app/modules/meta/views/edit_form.php
@@ -1,19 +1,22 @@
-
\ No newline at end of file
diff --git a/app/modules/meta/views/outline.php b/app/modules/meta/views/outline.php
index 432da7b..fb8f939 100644
--- a/app/modules/meta/views/outline.php
+++ b/app/modules/meta/views/outline.php
@@ -1,5 +1,18 @@
Outline
+
+ Genre
+
+
+
+
+
$genre_array): ?>
diff --git a/app/modules/meta/views/section_detail.php b/app/modules/meta/views/section_detail.php
index 17c13aa..5007bf2 100644
--- a/app/modules/meta/views/section_detail.php
+++ b/app/modules/meta/views/section_detail.php
@@ -26,12 +26,18 @@
-
+ $d): ?>
$v): ?>
") !== FALSE) ? 'multiline' : 'pair' ?>
- = $k ?>
+
+ = $k ?>
+
+ Edit
+ Delete
+
+
= $v ?>
diff --git a/app/views/footer.php b/app/views/footer.php
index 2db2403..e72198f 100644
--- a/app/views/footer.php
+++ b/app/views/footer.php
@@ -1,4 +1,8 @@
-
+
+
+
= $foot_js ?>
diff --git a/app/views/header.php b/app/views/header.php
index 4e663f5..33226c1 100644
--- a/app/views/header.php
+++ b/app/views/header.php
@@ -9,4 +9,5 @@
= $head_js ?>
= (!empty($body_id)) ? " id=\"" . $body_id . "\"" : ""; ?>>
-
\ No newline at end of file
+
+[Data Outline ]
\ No newline at end of file
diff --git a/app/views/message.php b/app/views/message.php
index 8f1fbd0..f77682f 100644
--- a/app/views/message.php
+++ b/app/views/message.php
@@ -1,5 +1,5 @@
= $message ?>
-
+ x
\ No newline at end of file
diff --git a/assets/config/js_groups.php b/assets/config/js_groups.php
index 663235a..19b7c29 100755
--- a/assets/config/js_groups.php
+++ b/assets/config/js_groups.php
@@ -25,9 +25,9 @@ return array(
'path/to/css/file2.css'
),
*/
-
+
'js' => array(
- 'kis-lite-dom-min.js',
+ 'kis-lite-dom.js',
'tinyeditor.js',
'meta.js'
),
diff --git a/assets/css/message.css b/assets/css/message.css
index 9eb6977..774b6cb 100644
--- a/assets/css/message.css
+++ b/assets/css/message.css
@@ -8,10 +8,16 @@
.message .close{
width:1em;
height:1em;
- border:1px solid #000;
position:absolute;
right:0.5em;
top:0.5em;
+ text-align:center;
+ vertical-align:middle;
+ line-height:1em;
+}
+
+.message .close:hover {
+ cursor:pointer;
}
.message .icon{
diff --git a/assets/css/normalize.css b/assets/css/normalize.css
index 4474dee..f7bb8a4 100644
--- a/assets/css/normalize.css
+++ b/assets/css/normalize.css
@@ -30,8 +30,6 @@ audio,
canvas,
video {
display: inline-block;
- *display: inline;
- *zoom: 1;
}
/*
@@ -83,14 +81,6 @@ textarea {
font-family: sans-serif;
}
-/*
- * Addresses margins handled incorrectly in IE6/7
- */
-
-body {
- margin: 0;
-}
-
/* =============================================================================
Links
@@ -192,15 +182,6 @@ mark {
color: #000;
}
-/*
- * Addresses margins set differently in IE6/7
- */
-
-p,
-pre {
- margin: 1em 0;
-}
-
/*
* Corrects font family set oddly in IE6, S4/5, Chrome
* en.wikipedia.org/wiki/User:Davidgothberg/Test59
@@ -211,7 +192,6 @@ code,
kbd,
samp {
font-family: monospace, serif;
- _font-family: 'courier new', monospace;
font-size: 1em;
}
@@ -226,18 +206,8 @@ pre {
}
/*
- * 1. Addresses CSS quotes not supported in IE6/7
- * 2. Addresses quote property not supported in S4
+ * Addresses quote property not supported in S4
*/
-
-/* 1 */
-
-q {
- quotes: none;
-}
-
-/* 2 */
-
q:before,
q:after {
content: '';
@@ -270,59 +240,16 @@ sub {
}
-/* =============================================================================
- Lists
- ========================================================================== */
-
-/*
- * Addresses margins set differently in IE6/7
- */
-
-dl,
-menu,
-ol,
-ul {
- margin: 1em 0;
-}
-
-dd {
- margin: 0 0 0 40px;
-}
-
-/*
- * Addresses paddings set differently in IE6/7
- */
-
-menu,
-ol,
-ul {
- padding: 0 0 0 40px;
-}
-
-/*
- * Corrects list images handled incorrectly in IE7
- */
-
-nav ul,
-nav ol {
- list-style: none;
- list-style-image: none;
-}
-
-
/* =============================================================================
Embedded content
========================================================================== */
/*
- * 1. Removes border when inside 'a' element in IE6/7/8/9, FF3
- * 2. Improves image quality when scaled in IE7
- * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
+ * Removes border when inside 'a' element in IE6/7/8/9, FF3
*/
img {
- border: 0; /* 1 */
- -ms-interpolation-mode: bicubic; /* 2 */
+ border: 0;
}
/*
@@ -351,14 +278,6 @@ figure {
Forms
========================================================================== */
-/*
- * Corrects margin displayed oddly in IE6/7
- */
-
-form {
- margin: 0;
-}
-
/*
* Define consistent border, margin, and padding
*/
@@ -372,14 +291,12 @@ fieldset {
/*
* 1. Corrects color not being inherited in IE6/7/8/9
* 2. Corrects text not wrapping in FF3
- * 3. Corrects alignment displayed oddly in IE6/7
*/
legend {
border: 0; /* 1 */
padding: 0;
white-space: normal; /* 2 */
- *margin-left: -7px; /* 3 */
}
/*
@@ -395,7 +312,6 @@ textarea {
font-size: 100%; /* 1 */
margin: 0; /* 2 */
vertical-align: baseline; /* 3 */
- *vertical-align: middle; /* 3 */
}
/*
@@ -420,7 +336,6 @@ input[type="reset"],
input[type="submit"] {
cursor: pointer; /* 1 */
-webkit-appearance: button; /* 2 */
- *overflow: visible; /* 3 */
}
/*
@@ -435,16 +350,12 @@ input[disabled] {
/*
* 1. Addresses box sizing set to content-box in IE8/9
* 2. Removes excess padding in IE8/9
- * 3. Removes excess padding in IE7
- Known issue: excess padding remains in IE6
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
- *height: 13px; /* 3 */
- *width: 13px; /* 3 */
}
/*
diff --git a/assets/css/theme.css b/assets/css/theme.css
index 5722b0d..ecd50e9 100644
--- a/assets/css/theme.css
+++ b/assets/css/theme.css
@@ -1,6 +1,10 @@
/* ---------------- */
/* ! General Styles */
/* ---------------- */
+* {
+ vertical-align:middle;
+}
+
html, body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight:200;
@@ -11,10 +15,12 @@ html, body {
button {
color:#312;
- padding:5px;
- border:1px solid #555;
+ padding:0.25em;
+ border:1px solid #888;
border-radius:5px;
- box-shadow:1px 1px #a98;
+ box-shadow:1px 1px #aaa;
+ min-width:65px;
+ vertical-align:middle;
}
a {
@@ -39,11 +45,26 @@ h1,h2 {
width:25%;
}
-/* Hide forms by default */
-fieldset dl {
- display:none;
+ul {
+ /*padding:auto;*/
+ padding-left:2.5em;
+ margin:0;
}
+li {
+ padding:0.5em 0;
+}
+
+dd {
+ /*margin:auto;*/
+ margin-left:0.5em;
+}
+
+/* Hide forms by default */
+/*fieldset dl {
+ display:none;
+}*/
+
/* form styles */
form dt, form dd {
display:inline-block;
@@ -68,32 +89,62 @@ form dd {
position:absolute;
display:none;
margin-left:1em;
+ vertical-align:middle;
}
-li:hover .modify, dt:hover .modify {
+li:hover > .modify, dt:hover > .modify {
display:inline-block;
+ vertical-align:middle;
}
button.save {
background:#797;
- color:#eee;
+ background:-o-linear-gradient(#797, #595);
+ background:-moz-linear-gradient(#797, #595);
+ background:-webkit-linear-gradient(#797, #595);
+ background:linear-gradient(#797, #595);
+ color:#fff;
}
button.save:hover {
background:#595;
+ background:-o-linear-gradient(#595, #797);
+ background:-moz-linear-gradient(#595, #797);
+ background:-webkit-linear-gradient(#595, #797);
+ background:linear-gradient(#595, #797);
}
button.edit {
+ background:#fff;
+ background:-o-linear-gradient(#fff, #ddd);
+ background:-moz-linear-gradient(#fff, #ddd);
+ background:-webkit-linear-gradient(#fff, #ddd);
+ background:linear-gradient(#fff, #ddd);
+}
+button.edit:hover {
+ background:#ddd;
+ background:-o-linear-gradient(#ddd, #fff);
+ background:-moz-linear-gradient(#ddd, #fff);
+ background:-webkit-linear-gradient(#ddd, #fff);
+ background:linear-gradient(#ddd, #fff);
}
button.delete {
background:#977;
- color:#eee;
+ background:-o-linear-gradient(#977, #955);
+ background:-moz-linear-gradient(#977, #955);
+ background:-webkit-linear-gradient(#977, #955);
+ background:linear-gradient(#977, #955);
+ color:#fff;
}
button.delete:hover {
background:#955;
+ background:-o-linear-gradient(#955, #977);
+ background:-moz-linear-gradient(#955, #977);
+ background:-webkit-linear-gradient(#955, #977);
+ background:linear-gradient(#955, #977);
}
/* ! Outline styles */
@@ -106,6 +157,14 @@ button.delete:hover {
margin-left:0.5em;
}
+dl.outline {
+ border-bottom:1px dotted #555;
+}
+ dl.outline dt {
+ display:list-item;
+ list-style:square inside;
+ }
+
.list li {
list-style:none;
}
@@ -146,5 +205,33 @@ dl.pair dd {
padding-left:0;
}
+/* ! Form overlay styles */
+#overlay_bg {
+ background:#777;
+ background:rgba(105,105,220,0.85);
+ position:fixed;
+ display:none;
+ width:900%;
+ height:900%;
+ z-index:5;
+ left:0;
+ top:0;
+}
+
+#overlay {
+ position:absolute;
+ background:#ddd;
+ /*background:rgba(255,255,255,0.85);
+ top:25%;
+ left:25%;
+ width:600px;
+ height:auto;*/
+ min-width:700px;
+ padding:0.5em;
+ border-radius:5px;
+ display:none;
+ z-index:25;
+}
+
diff --git a/assets/js.php b/assets/js.php
index 5bda3bd..caf3a5b 100755
--- a/assets/js.php
+++ b/assets/js.php
@@ -49,7 +49,7 @@ function get_files()
foreach ($groups[$_GET['g']] as $file)
{
$new_file = realpath($js_root.$file);
- $js .= file_get_contents($new_file);
+ $js .= file_get_contents($new_file)."\n";
}
return $js;
@@ -73,10 +73,10 @@ function google_min($new_file)
//curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'output_info=compiled_code&output_format=text&compilation_level=SIMPLE_OPTIMIZATIONS&js_code=' . urlencode($new_file));
$output = curl_exec($ch);
-
+
//die(curl_getinfo($ch, CURLINFO_HTTP_CODE));
curl_close($ch);
-
+
return $output;
}
diff --git a/assets/js/cache/js b/assets/js/cache/js
index f61d7b4..124373f 100644
--- a/assets/js/cache/js
+++ b/assets/js/cache/js
@@ -1,34 +1,41 @@
-(function(){if("undefined"!==typeof document.querySelector){var f,e,d,c;f=function(a){c="undefined"===typeof a?"undefined"!==typeof f.el?f.el:document.documentElement:"object"!==typeof a?e(a):a;f.prototype.el=c;var a=d(f),b;for(b in a)"object"===typeof a[b]&&(a[b].el=c);a.el=c;return a};e=function(a,b){var c;if("string"!=typeof a||"undefined"===typeof a)return a;c=null!=b&&1===b.nodeType?b:document;if(a.match(/^#([\w\-]+$)/))return document.getElementById(a.split("#")[1]);c=c.querySelectorAll(a);
-return 1===c.length?c[0]:c};d=function(a){var b;if("undefined"!==typeof a){if("undefined"!==typeof Object.create)return Object.create(a);b=typeof a;if(!("object"!==b&&"function"!==b))return b=function(){},b.prototype=a,new b}};f.ext=function(a,b){b.el=c;f[a]=b};f.ext("each",function(a){if("undefined"!==typeof c.length&&c!==window)if("undefined"!==typeof Array.prototype.forEach)[].forEach.call(c,a);else{var b=c.length;if(0!==b)for(var d,e=0;e"],["Header 1",""],["Header 2",""],["Header 3",""],["Header 4",""],["Header 5",""],["Header 6",""]];k=m.length;h=0;
-g.className="testyle";g.onchange=new Function(this.n+'.ddaction(this,"formatblock")');for(h;h";f=a.bodyid?' id="'+a.bodyid+'"':"";a.cssfile&&(b+=' ');a.css&&(b+='");
-b+=""+(a.content||this.t.value);this.e.write(b+"");this.e.close();this.e.designMode="on";this.d=1;if(this.xhtml)try{this.e.execCommand("styleWithCSS",0,0)}catch(p){try{this.e.execCommand("useCSS",0,1)}catch(q){}}}var e=[],d=-30;e.cut=[1,"Cut","a","cut",1];e.copy=[2,"Copy","a","copy",1];e.paste=[3,"Paste","a","paste",1];e.bold=[4,"Bold","a","bold"];e.italic=[5,"Italic","a","italic"];e.underline=[6,"Underline","a","underline"];e.strikethrough=[7,"Strikethrough","a","strikethrough"];
-e.subscript=[8,"Subscript","a","subscript"];e.superscript=[9,"Superscript","a","superscript"];e.orderedlist=[10,"Insert Ordered List","a","insertorderedlist"];e.unorderedlist=[11,"Insert Unordered List","a","insertunorderedlist"];e.outdent=[12,"Outdent","a","outdent"];e.indent=[13,"Indent","a","indent"];e.leftalign=[14,"Left Align","a","justifyleft"];e.centeralign=[15,"Center Align","a","justifycenter"];e.rightalign=[16,"Right Align","a","justifyright"];e.blockjustify=[17,"Block Justify","a","justifyfull"];
-e.undo=[18,"Undo","a","undo"];e.redo=[19,"Redo","a","redo"];e.image=[20,"Insert Image","i","insertimage","Enter Image URL:","http://"];e.hr=[21,"Insert Horizontal Rule","a","inserthorizontalrule"];e.link=[22,"Insert Hyperlink","i","createlink","Enter URL:","http://"];e.unlink=[23,"Remove Hyperlink","a","unlink"];e.unformat=[24,"Remove Formatting","a","removeformat"];e.print=[25,"Print","a","print"];f.prototype.print=function(){this.i.contentWindow.print()};f.prototype.hover=function(c,a,b){c.style.backgroundPosition=
-(b?"34px ":"0px ")+a+"px"};f.prototype.ddaction=function(c,a){this.action(a,c.options[c.selectedIndex].value)};f.prototype.action=function(c,a,b){b&&!this.ie?alert("Your browser does not support this function."):this.e.execCommand(c,0,a||null)};f.prototype.insert=function(c,a,b){c=prompt(c,a);null!=c&&""!=c&&this.e.execCommand(b,0,c)};f.prototype.setfont=function(){execCommand("formatblock",0,hType)};f.prototype.resize=function(c){this.mv&&this.freeze();this.i.bcs=TINY.cursor.top(c);this.mv=new Function("event",
-this.n+".move(event)");this.sr=new Function(this.n+".freeze()");this.ie?(document.attachEvent("onmousemove",this.mv),document.attachEvent("onmouseup",this.sr)):(document.addEventListener("mousemove",this.mv,1),document.addEventListener("mouseup",this.sr,1))};f.prototype.move=function(c){c=TINY.cursor.top(c);this.i.height=parseInt(this.i.height)+c-this.i.bcs;this.i.bcs=c};f.prototype.freeze=function(){this.ie?(document.detachEvent("onmousemove",this.mv),document.detachEvent("onmouseup",this.sr)):(document.removeEventListener("mousemove",
-this.mv,1),document.removeEventListener("mouseup",this.sr,1))};f.prototype.toggle=function(c,a){if(this.d){if(b=this.e.body.innerHTML,this.xhtml&&(b=b.replace(/(.*)<\/span>/gi,"$1"),b=b.replace(/ class="apple-style-span"/gi,""),b=b.replace(//gi,""),b=b.replace(/ /gi," "),b=b.replace(/ $/gi,""),b=b.replace(/^ /gi,""),b=b.replace(/( ]+[^\/])>/gi,"$1 />"),b=b.replace(/]*>(.*?)<\/b[^>]*>/gi,"$1 "),b=b.replace(/]*>(.*?)<\/i[^>]*>/gi,
-"$1 "),b=b.replace(/]*>(.*?)<\/u[^>]*>/gi,'$1 '),b=b.replace(/<(b|strong|em|i|u) style="font-weight: normal;?">(.*)<\/(b|strong|em|i|u)>/gi,"$2"),b=b.replace(/<(b|strong|em|i|u) style="(.*)">(.*)<\/(b|strong|em|i|u)>/gi,'<$4>$3$4> '),b=b.replace(/(.*)<\/span>/gi,"$1"),b=b.replace(/(.*)<\/span>/gi,"$1 "),b=b.replace(/(.*)<\/span>/gi,
-"$1 "),b=b.replace(/(.*)<\/span>|]*>(.*?)<\/b[^>]*>/gi,"$1 ")),a&&(a.innerHTML=this.obj.toggletext||"wysiwyg"),this.t.value=b,!c)this.t.style.height=this.i.height+"px",this.i.style.display="none",this.t.style.display="block",this.d=0}else{var b=this.t.value;a&&(a.innerHTML=this.obj.toggletext||"source");this.xhtml&&!this.ie&&(b=b.replace(/(.*)<\/strong>/gi,'$1 '),b=b.replace(/(.*)<\/em>/gi,
-'$1 '));this.e.body.innerHTML=b;this.t.style.display="none";this.i.style.display="block";this.d=1}};f.prototype.post=function(){this.d&&this.toggle(1)};return{edit:f}}();TINY.cursor=function(){return{top:function(f){return T$$$()?window.event.clientY+document.documentElement.scrollTop+document.body.scrollTop:f.clientY+window.scrollY}}}();
-(function(){$_("fieldset dl").dom.hide();$_("fieldset legend").event.add("click",function(){var f=$_("fieldset dl").dom;"none"==f.css("display").trim()?f.show():f.hide()});$_("button.delete").event.add("click",function(){var f=this.parentNode.id,f=f.split("_");confirm("Are you sure you want to delete this "+f[0]+"? Deleting this item will delete all items under it. There is no undo.")});new TINY.editor.edit("editor",{id:"input",width:450,height:175,cssclass:"te",controlclass:"tecontrol",rowclass:"teheader",
-dividerclass:"tedivider",controls:"bold italic underline | subscript superscript | orderedlist unorderedlist | leftalign centeralign rightalign | unformat | undo redo n image hr link unlink | cut copy paste print".split(" "),footer:!0,xhtml:!0,cssfile:"//github.timshomepage.net/meta/assets/css.php/g/css",bodyid:"editor",footerclass:"tefooter",toggle:{text:"source",activetext:"wysiwyg",cssclass:"toggle"},resize:{cssclass:"resize"}})})();
+(function(){if("undefined"!==typeof document.querySelector){var g,e,d,f;g=function(a){f="undefined"===typeof a?"undefined"!==typeof g.el?g.el:document.documentElement:"object"!==typeof a?e(a):a;g.prototype.el=f;var a=d(g),c;for(c in a)"object"===typeof a[c]&&(a[c].el=f);a.el=f;return a};e=function(a,c){var b;if("string"!=typeof a||"undefined"===typeof a)return a;b=null!=c&&1===c.nodeType?c:document;if(a.match(/^#([\w\-]+$)/))return document.getElementById(a.split("#")[1]);b=b.querySelectorAll(a);
+return 1===b.length?b[0]:b};d=function(a){var c;if("undefined"!==typeof a){if("undefined"!==typeof Object.create)return Object.create(a);c=typeof a;if(!("object"!==c&&"function"!==c))return c=function(){},c.prototype=a,new c}};g.ext=function(a,c){c.el=f;g[a]=c};g.ext("each",function(a){if("undefined"!==typeof f.length&&f!==window)if("undefined"!==typeof Array.prototype.forEach)[].forEach.call(f,a);else{var c=f.length;if(0!==c)for(var b,d=0;d1&&typeof f==="undefined")return null;if(a.length>1&&typeof f!=="undefined")$_.each(function(a){return g(a,d,f)});else return g(a,d,f)},text:function(d){var f,a,c;c=this.el;a=typeof c.textContent!=="undefined"?"textContent":typeof c.innerText!=="undefined"?"innerText":
+"innerHTML";f=c[a];if(typeof d!=="undefined")return c[a]=d;return f},css:function(d,f){if(typeof f==="undefined")return e(this.el,d);$_.each(function(a){e(a,d,f)})},append:function(d){typeof document.insertAdjacentHTML!=="undefined"?this.el.insertAdjacentHTML("beforeend",d):this.el.innerHTML=this.el.innerHTML+d},prepend:function(d){typeof document.insertAdjacentHTML!=="undefined"?this.el.insertAdjacentHTML("afterbegin",d):this.el.innerHTML=d+this.el.innerHTML},html:function(d){if(typeof d!=="undefined")this.el.innerHTML=
+d;return this.el.innerHTML}})})();
+(function(){var g={};window.TINY=g;var e=function(a,c){var b,e,g;this.n=a;window[a]=this;this.t=document.getElementById(c.id);this.obj=c;this.xhtml=c.xhtml;var h=document.createElement("div"),l=document.createElement("div"),i=document.createElement("div"),j=c.controls.length,o=0;this.i=document.createElement("iframe");this.i.frameBorder=0;this.i.width=c.width||"500";this.i.height=c.height||"250";this.ie=document.all&&document.attachEvent?1:0;i.className=c.rowclass||"teheader";h.className=c.cssclass||
+"te";h.style.width=this.i.width+"px";h.appendChild(i);for(o;o"],["Header 1",""],["Header 2",""],["Header 3",""],
+["Header 4",""],["Header 5",""],["Header 6",""]];g=styles.length;e=0;b.className="testyle";b.onchange=new Function(this.n+'.ddaction(this,"formatblock")');for(e;e";l=c.bodyid?' id="'+c.bodyid+'"':"";c.cssfile&&(h=
+h+(' '));c.css&&(h=h+('"));h=h+(""+(c.content||this.t.value));this.e.write(h+"