|
|
@ -49,7 +49,6 @@ |
|
|
|
<div class="toolbar"> |
|
|
|
<div class="toolbar-left"> |
|
|
|
<span class="item"><a href="/"><img src="/editor-files/quill-logo-36.png" width="36" height="31" class="logo"></a></span> |
|
|
|
<?= partial('partials/header') ?>
|
|
|
|
<?php if($this->user): ?>
|
|
|
|
<span class="item text"><b><?= display_url($this->user->url) ?></b></span>
|
|
|
|
<?php endif; ?>
|
|
|
@ -111,9 +110,9 @@ |
|
|
|
<label for="note_syndicate-to"><a href="javascript:reload_syndications()">Reload</a></label></td> |
|
|
|
<td id="syndication-container"> |
|
|
|
<?php |
|
|
|
if($this->syndication_targets) { |
|
|
|
if($this->user->syndication_targets) { |
|
|
|
echo '<ul>'; |
|
|
|
foreach($this->syndication_targets as $syn) { |
|
|
|
foreach($this->user->syndication_targets as $syn) { |
|
|
|
echo '<li>' |
|
|
|
. '<button data-syndicate-to="'.(isset($syn['uid']) ? htmlspecialchars($syn['uid']) : htmlspecialchars($syn['target'])).'" class="btn btn-default btn-block">' |
|
|
|
. ($syn['favicon'] ? '<img src="'.htmlspecialchars($syn['favicon']).'" width="16" height="16"> ' : '') |
|
|
@ -163,62 +162,6 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<script src="/editor-files/editor.js"></script> |
|
|
|
<script> |
|
|
|
$(function(){ |
|
|
|
|
|
|
|
<?php if(!Config::$twitterClientID): ?>
|
|
|
|
$.getJSON("/auth/twitter", function(data){ |
|
|
|
// Check if we're already authorized with twitter
|
|
|
|
if(data && data.result == 'ok') { |
|
|
|
$("#twitter-button").val("Connected").addClass("btn-success"); |
|
|
|
} else if(data && data.url) { |
|
|
|
$("#twitter-button").val("Sign In").data("url", data.url).addClass("btn-warning"); |
|
|
|
} else { |
|
|
|
$("#twitter-button").val("Error").addClass("btn-danger"); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
$("#twitter-button").click(function(){ |
|
|
|
if($(this).data('url')) { |
|
|
|
window.location = $(this).data('url'); |
|
|
|
} else { |
|
|
|
$.getJSON("/auth/twitter", {login: 1}, function(data){ |
|
|
|
window.location = data.url; |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
$("#send-html-content").click(function(){ |
|
|
|
var enabled = $(this).attr("checked") == "checked"; |
|
|
|
$.post("/settings/save", { |
|
|
|
html_content: (enabled ? 1 : 0) |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
$("#save-slug-field").click(function(){ |
|
|
|
$.post("/settings/save", { |
|
|
|
slug_field: $("#slug-field-name").val() |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
$("#save-syndicate-to-field").click(function(){ |
|
|
|
$.post("/settings/save", { |
|
|
|
syndicate_field: $("#syndicate-to-field-name").val() |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
$("#reset-login").click(function(){ |
|
|
|
$.post("/auth/reset", function(){ |
|
|
|
window.location = "/"; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
<?= partial('partials/syndication-js') ?>
|
|
|
|
</script> |
|
|
|
</body> |
|
|
|
</html> |