Skip to content

Commit

Permalink
Clean up view pages
Browse files Browse the repository at this point in the history
  • Loading branch information
LordRalex committed Mar 30, 2015
1 parent 9701329 commit 89e515d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 35 deletions.
31 changes: 0 additions & 31 deletions html/factoid/edit.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -76,37 +76,6 @@
e.setSelection(cursor, cursor + chunk.length);
}
}, {
name: 'customItalic',
title: 'Italic',
hotkey: 'Ctrl+I',
icon: {glyph: 'glyphicon glyphicon-italic', fa: 'fa fa-italic', 'fa-3': 'icon-italic'},
callback: function (e) {
// Give/remove ** surround the selection
var chunk, cursor, selected = e.getSelection(),
content = e.getContent();

if (selected.length === 0) {
// Give extra word
chunk = e.__localize('');
} else {
chunk = selected.text;
}

// transform selection and set the cursor into chunked text
if (content.substr(selected.start - 3, 3) === '[i]'
&& content.substr(selected.end, 4) === '[/i]') {
e.setSelection(selected.start - 3, selected.end + 4);
e.replaceSelection(chunk);
cursor = selected.start - 3;
} else {
e.replaceSelection('[i]' + chunk + '[/i]');
cursor = selected.start + 3;
}

// Set the cursor
e.setSelection(cursor, cursor + chunk.length);
}
}, {
name: "cmdUnderlineC",
toggle: true,
title: "Underline",
Expand Down
4 changes: 2 additions & 2 deletions html/factoid/factoid.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown">Select Database <b class="caret"></b></a>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Select Database <b class="caret"></b></a>
<ul data-bind="foreach: gameTable" id="dbList" class="dropdown-menu">
<li data-bind="click: loadDataFromMenu"><a data-bind="text: $data.displayname"></a></li>
<li><a data-bind="click: loadDataFromMenu, text: $data.displayname, attr: {href: '?db=' + $data.displayname}"></a></li>
</ul>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion html/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<?php if ($isset) { ?>
<li><a href="/admin/ban">Ban Management</a></li>
<li><a href="/admin/user">User Management</a></li>
<li><a href="/admin/bot">Bot Management</a></li>
<!--<li><a href="/admin/bot">Bot Management</a></li>-->
<?php } ?>
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion routes/factoid/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
try {
if (Authentication::checkPermission('factoids.edit')) {
$factoids = Factoids::getFactoid($request->param('id'));
$service->render(HTML_DIR . 'index.phtml', array('action' => 'factoid', 'page' => HTML_DIR . 'factoid/edit.phtml', 'id' => $factoids['id'], 'name' => $factoids['name'], 'content' => $factoids['content'], 'game' => $factoids['game'], 'mode' => 'Edit'));
$service->render(HTML_DIR . 'index.phtml', array('action' => 'factoid', 'page' => HTML_DIR . 'factoid/edit.phtml', 'id' => $factoids['id'], 'name' => $factoids['name'], 'content' => str_replace(';;', "\n", $factoids['content']), 'game' => $factoids['game'], 'mode' => 'Edit'));
}
} catch (PDOException $ex) {
Utilities::logError($ex);
Expand Down

0 comments on commit 89e515d

Please sign in to comment.