diff --git a/README.md b/README.md
index f29e248..338a8f5 100755
--- a/README.md
+++ b/README.md
@@ -170,17 +170,6 @@ Include custom links in the sidebar.
}
```
-###File editor:
-![File editor](https://f.cloud.github.com/assets/1788727/1954191/44358884-81d1-11e3-859d-254b9fb81808.png)
-
-Enable front-end Markdown editor. _Disabled by default_.
-
-```json
-{
- "file_editor": true
-}
-```
-
###Google Analytics:
This will embed the google analytics tracking code.
diff --git a/docs/00_Getting_Started.md b/docs/00_Getting_Started.md
index a5809ac..8ddeebe 100644
--- a/docs/00_Getting_Started.md
+++ b/docs/00_Getting_Started.md
@@ -181,17 +181,6 @@ Include custom links in the sidebar.
}
```
-### File editor:
-![File editor](https://f.cloud.github.com/assets/1788727/1954191/44358884-81d1-11e3-859d-254b9fb81808.png)
-
-Enable front-end Markdown editor. _Disabled by default_.
-
-```json
-{
- "file_editor": true
-}
-```
-
### Google Analytics:
This will embed the google analytics tracking code.
diff --git a/docs/config.json b/docs/config.json
index a2dfbef..c09beac 100644
--- a/docs/config.json
+++ b/docs/config.json
@@ -10,7 +10,6 @@
"breadcrumb_separator": "Chevrons",
"date_modified": true,
"float": true,
- "file_editor": false,
"repo": "justinwalsh/daux.io",
"ignore": {
"files": ["Work_In_Progress.md"],
diff --git a/global.json b/global.json
index d1b9c10..da50b16 100644
--- a/global.json
+++ b/global.json
@@ -23,7 +23,6 @@
"toggle_code": false,
"date_modified": false,
"float": false,
- "file_editor": false,
"timezone": "America/Los_Angeles",
"google_analytics": false,
diff --git a/libs/Server/Server.php b/libs/Server/Server.php
index 2740339..80b9963 100644
--- a/libs/Server/Server.php
+++ b/libs/Server/Server.php
@@ -104,46 +104,11 @@ class Server
$request = $this->getRequest();
$request = urldecode($request);
- $request_type = isset($query['method']) ? $query['method'] : '';
if ($request == 'first_page') {
$request = $this->daux->tree->getFirstPage()->getUri();
}
- switch ($request_type) {
- case 'DauxEdit':
- if (!$this->daux->options['file_editor']) {
- throw new Exception('Editing is currently disabled in config');
- }
-
- $content = isset($query['markdown']) ? $query['markdown'] : '';
- return $this->saveFile($request, $content);
-
- default:
- return $this->getPage($request);
- }
- }
-
- /**
- * @param string $request
- * @param string $content
- * @return SimplePage
- *
- * @throws Exception
- * @throws NotFoundException
- */
- private function saveFile($request, $content)
- {
- $file = $this->getFile($request);
-
- if ($file === false) {
- throw new NotFoundException('The Page you requested is yet to be made. Try again later.');
- }
-
- if (!$file->write($content)) {
- throw new Exception('The file you wish to write to is not writable.');
- }
-
- return new SimplePage('Success', 'Successfully Edited');
+ return $this->getPage($request);
}
/**
diff --git a/libs/Tree/Entry.php b/libs/Tree/Entry.php
index 9815adf..d7f38d2 100644
--- a/libs/Tree/Entry.php
+++ b/libs/Tree/Entry.php
@@ -181,20 +181,6 @@ abstract class Entry
$this->index_page = false;
}
- /**
- * @param string $content
- * @return bool
- */
- public function write($content)
- {
- if (!is_writable($this->local_path)) {
- return false;
- }
-
- file_put_contents($this->local_path, $content);
- return true;
- }
-
/**
* @return string
*/
diff --git a/resources/js/editor.js b/resources/js/editor.js
deleted file mode 100644
index 9209d59..0000000
--- a/resources/js/editor.js
+++ /dev/null
@@ -1,53 +0,0 @@
-$(document).ready(function() {
- var markdown_editor = $("#markdown_editor"),
- save_editor = $(".save_editor"),
- editor = $(".editor");
-
- $("#editThis").click(function() {
- editor.css({"display":"block"});
- markdown_editor.autosize().val();
- });
-
- $(".closeEditor").click(function() {
- editor.css({"display":"none"});
- });
-
- save_editor.click(function() {
- var original_text = save_editor.text();
- save_editor.text("Saving...").addClass("disabled");
-
- $.post(window.location.href, {markdown: markdown_editor.val(), method: 'DauxEdit' }, function() {
- save_editor.text("Done! Reloading page in 5 seconds. You can cancel it with ESC key");
-
- var timeout = setTimeout(function() {
- location.reload()
- }, 5000); // lie
-
- $(document).keyup(function(e) {
- if (e.keyCode == 27) { // esc key
- clearTimeout(timeout);
- save_editor.text("Page reload cancelled");
- setTimeout(function() {
- save_editor.text(original_text).removeClass('disabled');
- }, 2000);
- }
- });
- }).fail(function() {
- save_editor.removeClass('disabled').addClass("btn-danger").text("Failed :( - try checking your read/write permissions");
- setTimeout(function() {
- save_editor.text(original_text).removeClass('btn-danger');
- },5000);
- });
- });
-});
-
-
-
-
-/*!
- Autosize v1.18.4 - 2014-01-11
- Automatically adjust textarea height based on user input.
- (c) 2014 Jack Moore - http://www.jacklmoore.com/autosize
- license: http://www.opensource.org/licenses/mit-license.php
-*/
-!function(a){var b,c={className:"autosizejs",append:"",callback:!1,resizeDelay:10,placeholder:!0},d='',e=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent"],f=a(d).data("autosize",!0)[0];f.style.lineHeight="99px","99px"===a(f).css("lineHeight")&&e.push("lineHeight"),f.style.lineHeight="",a.fn.autosize=function(d){return this.length?(d=a.extend({},c,d||{}),f.parentNode!==document.body&&a(document.body).append(f),this.each(function(){function c(){var b,c=window.getComputedStyle?window.getComputedStyle(m,null):!1;c?(b=m.getBoundingClientRect().width,0===b&&(b=parseInt(c.width,10)),a.each(["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],function(a,d){b-=parseInt(c[d],10)})):b=Math.max(n.width(),0),f.style.width=b+"px"}function g(){var g={};if(b=m,f.className=d.className,j=parseInt(n.css("maxHeight"),10),a.each(e,function(a,b){g[b]=n.css(b)}),a(f).css(g),c(),window.chrome){var h=m.style.width;m.style.width="0px";{m.offsetWidth}m.style.width=h}}function h(){var e,h;b!==m?g():c(),f.value=!m.value&&d.placeholder?(a(m).attr("placeholder")||"")+d.append:m.value+d.append,f.style.overflowY=m.style.overflowY,h=parseInt(m.style.height,10),f.scrollTop=0,f.scrollTop=9e4,e=f.scrollTop,j&&e>j?(m.style.overflowY="scroll",e=j):(m.style.overflowY="hidden",k>e&&(e=k)),e+=o,h!==e&&(m.style.height=e+"px",p&&d.callback.call(m,m))}function i(){clearTimeout(l),l=setTimeout(function(){var a=n.width();a!==r&&(r=a,h())},parseInt(d.resizeDelay,10))}var j,k,l,m=this,n=a(m),o=0,p=a.isFunction(d.callback),q={height:m.style.height,overflow:m.style.overflow,overflowY:m.style.overflowY,wordWrap:m.style.wordWrap,resize:m.style.resize},r=n.width();n.data("autosize")||(n.data("autosize",!0),("border-box"===n.css("box-sizing")||"border-box"===n.css("-moz-box-sizing")||"border-box"===n.css("-webkit-box-sizing"))&&(o=n.outerHeight()-n.height()),k=Math.max(parseInt(n.css("minHeight"),10)-o||0,n.height()),n.css({overflow:"hidden",overflowY:"hidden",wordWrap:"break-word",resize:"none"===n.css("resize")||"vertical"===n.css("resize")?"none":"horizontal"}),"onpropertychange"in m?"oninput"in m?n.on("input.autosize keyup.autosize",h):n.on("propertychange.autosize",function(){"value"===event.propertyName&&h()}):n.on("input.autosize",h),d.resizeDelay!==!1&&a(window).on("resize.autosize",i),n.on("autosize.resize",h),n.on("autosize.resizeIncludeStyle",function(){b=null,h()}),n.on("autosize.destroy",function(){b=null,clearTimeout(l),a(window).off("resize",i),n.off("autosize").off(".autosize").css(q).removeData("autosize")}),h())})):this}}(window.jQuery||window.$);
diff --git a/resources/themes/_common/less/daux-base.less b/resources/themes/_common/less/daux-base.less
index 136e1f8..4dc5eb5 100644
--- a/resources/themes/_common/less/daux-base.less
+++ b/resources/themes/_common/less/daux-base.less
@@ -11,5 +11,4 @@
@import "mixins.less";
@import "structure.less";
@import "components.less";
-@import "tools.less";
@import "highlight.less";
diff --git a/resources/themes/_common/less/tools.less b/resources/themes/_common/less/tools.less
deleted file mode 100644
index 2527b0b..0000000
--- a/resources/themes/_common/less/tools.less
+++ /dev/null
@@ -1,35 +0,0 @@
-/* ===========================================================================================
-Markdown editor
-============================================================================================== */
-
-.editor {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- background: white;
- padding: 20px;
- padding-bottom: 100px;
- min-height: 100%;
- height: auto;
- display: none;
-
- h3 {
- width: 100% !important;
- }
-
- &.paddingTop {
- padding-top: 50px;
- }
-}
-
-#markdown_editor {
- width: 85%;
- margin: 0 auto;
- padding: 10px;
- height: auto;
- font-size: 16px;
- min-height: 100px;
- font-family: "Ubuntu Mono", "Consolas", monospace;
- display: block;
-}
diff --git a/templates/content.php b/templates/content.php
index 29ee280..f012c37 100644
--- a/templates/content.php
+++ b/templates/content.php
@@ -6,7 +6,6 @@
if ($page['breadcrumbs']) echo $this->get_breadcrumb_title($page, $base_page);
else echo $page['title'];
?>
- Edit this page'; ?>
@@ -21,23 +20,10 @@
if ($page['breadcrumbs']) echo $this->get_breadcrumb_title($page, $base_page);
else echo $page['title'];
?>
- Edit this page'; ?>
-
-
-
You are editing Close
-
-
-
-
-
diff --git a/templates/layout/00_layout.php b/templates/layout/00_layout.php
index 19abf8f..d0d94dc 100644
--- a/templates/layout/00_layout.php
+++ b/templates/layout/00_layout.php
@@ -47,8 +47,6 @@
'; ?>
-
- '; ?>