diff --git a/.htaccess b/.htaccess index ba9f061..0307d1d 100644 --- a/.htaccess +++ b/.htaccess @@ -6,9 +6,9 @@ RewriteEngine on RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteRule ^(content|system)/ error404 [L] -RewriteCond %{REQUEST_URI} \.(css|js|png|woff)$ +RewriteCond %{REQUEST_URI} \.(css|js|png)$ RewriteRule ^media/plugins/(core-.+) system/core/$1 [L] -RewriteCond %{REQUEST_URI} \.(css|js|png|woff)$ +RewriteCond %{REQUEST_URI} \.(css|js|png)$ RewriteRule ^media/plugins/(.+) system/plugins/$1 [L] RewriteRule ^$ yellow.php [L] diff --git a/README.md b/README.md index 96bd8a6..15c6647 100644 --- a/README.md +++ b/README.md @@ -22,5 +22,4 @@ That's it. For more information see [Yellow documentation](https://github.com/ma License and a big thanks ------------------------ * Yellow and extensions by Mark Seuffert are licensed under [GPLv2](http://opensource.org/licenses/GPL-2.0) -* [PHP Markdown Extra](https://github.com/michelf/php-markdown) by Michel Fortin is licensed under [BSD license](http://opensource.org/licenses/BSD-3-Clause) -* [Font Awesome](https://github.com/FortAwesome/Font-Awesome) by Dave Gandy is licensed under [OFLv1.1](http://opensource.org/licenses/OFL-1.1) \ No newline at end of file +* [PHP Markdown Extra](https://github.com/michelf/php-markdown) by Michel Fortin is licensed under [BSD license](http://opensource.org/licenses/BSD-3-Clause) \ No newline at end of file diff --git a/system/core/core-fontawesome.woff b/system/core/core-fontawesome.woff deleted file mode 100644 index 8c1748a..0000000 Binary files a/system/core/core-fontawesome.woff and /dev/null differ diff --git a/system/core/core-webinterface.css b/system/core/core-webinterface.css index f4ace05..545e54d 100644 --- a/system/core/core-webinterface.css +++ b/system/core/core-webinterface.css @@ -1,4 +1,4 @@ -/* Yellow web interface 0.2.1 */ +/* Yellow web interface 0.2.2 */ .yellow-bar { position:relative; overflow:hidden; line-height:2.0em; } .yellow-bar-left { display:block; float:left; } @@ -47,19 +47,6 @@ #yellow-pane-edit #yellow-edit-text { margin:0; padding:5px; border:1px solid #bbb; resize:none; font-size:0.9em } #yellow-pane-edit #yellow-edit-info { margin:0; padding:5px; border:1px solid #bbb; display:none; } #yellow-pane-edit #yellow-edit-buttons { margin:5px 0; } -#yellow-pane-show { min-width:20em; overflow:auto; } #yellow-pane-user { } .yellow-icon { width:16px; height:16px; display:inline-block; background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA4UlEQVQoFZWQPQrCQBBGv80qwfyIIoKFhYWl1/EGFl5A7EyhIFgIgnZewpt4A5uAgoWIS0SMiRlJlqzZJtPMtzPvMbAsPqNUGaXoBC4tVJQL9gIsROQj2Kdzc4hqH2Ipsb8LTTge6lvwzo+w4O7AJExBFYI5ohtgwp7Q0hzBeEFsKGelCvEFYk2r2hi8B2cK4SEOMpg6K3yri/YJvIWPD9xxHeTpJKsXaPmAWFHnXYgZBbWKAvA8pMz7qML00glxWOTkRCfwRrpmXHIy6ATDyoTMlLjul3JLXdRd0HFyVlr4AhXBLDxuCuBRAAAAAElFTkSuQmCC); } - -@font-face { font-family:'FontAwesome'; font-style:normal; font-weight:normal; src:url('core-fontawesome.woff'); } -[class*="yellow-icon-"] { - font-family:FontAwesome; - font-style:normal; - font-weight:normal; - -webkit-font-smoothing:antialiased; -} -.yellow-icon-search:before { content:"\f002"; } -.yellow-icon-trash-o:before { content:"\f014"; } -.yellow-icon-caret-down:before { content:"\f0d7"; } -.yellow-icon-caret-up:before { content:"\f0d8"; } \ No newline at end of file diff --git a/system/core/core-webinterface.js b/system/core/core-webinterface.js index 37547f8..b9da8d7 100644 --- a/system/core/core-webinterface.js +++ b/system/core/core-webinterface.js @@ -1,16 +1,16 @@ -// Copyright (c) 2013 Datenstrom, http://datenstrom.se +// Copyright (c) 2013-2014 Datenstrom, http://datenstrom.se // This file may be used and distributed under the terms of the public license. // Yellow main API var yellow = { - version: "0.2.2", + version: "0.2.3", onClick: function(e) { yellow.webinterface.hidePanesOnClick(yellow.toolbox.getEventElement(e)); }, onKeydown: function(e) { yellow.webinterface.hidePanesOnKeydown(yellow.toolbox.getEventKeycode(e)); }, onResize: function() { yellow.webinterface.resizePanes(); }, onShow: function(id) { yellow.webinterface.showPane(id); }, onLogout: function() { yellow.toolbox.submitForm({"action":"logout"}); }, - webinterface:{}, page:{}, pages:{}, toolbox:{}, config:{}, text:{} + webinterface:{}, page:{}, toolbox:{}, config:{}, text:{} } // Yellow web interface @@ -40,7 +40,6 @@ yellow.webinterface = { yellow.toolbox.insertBefore(this.createBar("yellow-bar"), body.firstChild); yellow.toolbox.insertAfter(this.createPane("yellow-pane-edit"), body.firstChild); - yellow.toolbox.insertAfter(this.createPane("yellow-pane-show"), body.firstChild); yellow.toolbox.insertAfter(this.createPane("yellow-pane-user"), body.firstChild); yellow.toolbox.setText(document.getElementById("yellow-edit-text"), yellow.page.rawData); } else { @@ -64,12 +63,11 @@ yellow.webinterface = var location = yellow.config.serverBase+yellow.config.pluginLocation; elementBar.innerHTML = "
"+ - " Yellow"+ + " Yellow"+ ""+this.getText("Edit")+""+ - ""+this.getText("Show")+""+ "
"+ "
"+ - ""+yellow.config.userName+" "+ + ""+yellow.config.userName+" ▾"+ "
"; } return elementBar; @@ -97,7 +95,6 @@ yellow.webinterface = ""; } else if(id == "yellow-pane-edit") { elementDiv.innerHTML = - "

Editing page...

"+ "
"+ ""+ ""+ @@ -106,19 +103,6 @@ yellow.webinterface = ""+ ""+ "
"; - } else if(id == "yellow-pane-show") { - elementDiv.innerHTML = "

Showing files...

"; - var elementUl = document.createElement("ul"); - for(var n in yellow.pages) - { - var elementLi = document.createElement("li"); - var elementA = document.createElement("a"); - elementA.setAttribute("href", yellow.pages[n]["location"]); - yellow.toolbox.setText(elementA, yellow.pages[n]["title"]); - elementLi.appendChild(elementA); - elementUl.appendChild(elementLi); - } - elementDiv.appendChild(elementUl); } else if(id == "yellow-pane-user") { elementDiv.innerHTML = "

"+yellow.config.userEmail+"

"+ @@ -208,11 +192,6 @@ yellow.webinterface = var height3 = yellow.toolbox.getOuterHeight(document.getElementById("yellow-edit-text")); yellow.toolbox.setOuterHeight(document.getElementById("yellow-edit-text"), height1 - height2 + height3); } - if(yellow.toolbox.isVisible(document.getElementById("yellow-pane-show"))) - { - yellow.toolbox.setOuterTop(document.getElementById("yellow-pane-show"), paneTop); - yellow.toolbox.setOuterHeight(document.getElementById("yellow-pane-show"), paneHeight, true); - } if(yellow.toolbox.isVisible(document.getElementById("yellow-pane-user"))) { yellow.toolbox.setOuterTop(document.getElementById("yellow-pane-user"), paneTop); diff --git a/system/core/core-webinterface.php b/system/core/core-webinterface.php index 41fdec9..c42d537 100755 --- a/system/core/core-webinterface.php +++ b/system/core/core-webinterface.php @@ -5,7 +5,7 @@ // Web interface core plugin class YellowWebinterface { - const Version = "0.2.5"; + const Version = "0.2.6"; var $yellow; //access to API var $users; //web interface users var $activeLocation; //web interface location? (boolean) @@ -104,7 +104,6 @@ class YellowWebinterface if($this->isUser()) { $header .= "yellow.page.rawData = ".json_encode($this->yellow->page->rawData).";\n"; - $header .= "yellow.pages = ".json_encode($this->getPagesData()).";\n"; $header .= "yellow.config = ".json_encode($this->getConfigData($this->activeUserEmail)).";\n"; } $header .= "yellow.text = ".json_encode($this->yellow->text->getData("webinterface", $language)).";\n"; @@ -251,20 +250,6 @@ class YellowWebinterface { return !empty($this->activeUserEmail); } - - // Return page tree with content information, two levels - function getPagesData() - { - $data = array(); - foreach($this->yellow->pages->index(true, 2) as $page) - { - $data[$page->fileName] = array(); - $data[$page->fileName]["location"] = $page->getLocation(); - $data[$page->fileName]["modified"] = $page->getModified(); - $data[$page->fileName]["title"] = $page->getHtml("title"); - } - return $data; - } // Return configuration data including user information function getConfigData($email)