Browse Source

Revert "[WIP] Per-notice markdown setting"

Remove unfinished feature from master branch

This reverts commit e8c34e3fc0.
master
Chimo 2 years ago
parent
commit
99b512ef0d
5 changed files with 1 additions and 39 deletions
  1. 1
    9
      MarkdownPlugin.php
  2. 0
    21
      css/markdown.css
  3. BIN
      images/markdown-disabled.png
  4. BIN
      images/markdown-enabled.png
  5. 0
    9
      js/gs-markdown.js

+ 1
- 9
MarkdownPlugin.php View File

@@ -6,7 +6,7 @@ if (!defined('GNUSOCIAL')) {

class MarkdownPlugin extends Plugin
{
const VERSION = '0.0.10';
const VERSION = '0.0.9';
const NAME_SPACE = 'markdown'; // 'namespace' is a reserved keyword

function initialize()
@@ -173,14 +173,6 @@ class MarkdownPlugin extends Plugin
return true;
}

function onEndShowNoticeFormData($action)
{
$action->elementStart('div', array('class' => 'notice_data-markdown_wrap'));
$action->element('input', array('class' => 'checkbox', 'id' => 'markdown', 'type' => 'checkbox'));
$action->element('label', array('class' => 'notice_data-markdown', 'for' => 'markdown'), 'Parse this notice as markdown');
$action->elementEnd('div');
}

function onEndShowStyles($action)
{
$action->cssLink($this->path('css/markdown.css'));

+ 0
- 21
css/markdown.css View File

@@ -1,24 +1,3 @@
#notices_primary .e-content h2 {
display: block;
}

.notice_data-markdown {
background: url("../images/markdown-disabled.png") no-repeat top left;
cursor: pointer;
display: block;
height: 16px;
position: absolute;
right: 0;
text-indent: -9999px;
top: 52px;
width: 16px;
z-index: 99;
}

.notice_data-markdown_wrap input {
visibility: hidden;
}

.notice_data-markdown_wrap .checkbox:checked + .notice_data-markdown {
background: url("../images/markdown-enabled.png") no-repeat top left;
}

BIN
images/markdown-disabled.png View File


BIN
images/markdown-enabled.png View File


+ 0
- 9
js/gs-markdown.js View File

@@ -1,9 +0,0 @@
( function() {
/*
* TODO:
* Check the state of the checkbox (checked = markdown-enabled)
* Save the opposite setting
* Change the state of the button
*/
}() );


Loading…
Cancel
Save