[CORE] Move public resources to a /public directory
Advantages: * Increases security by preventing direct access to file/ * We are careful and have a defined('GNUSOCIAL') || die() to prevent direct access to GS files, but we may miss one or a vendor/extlib may not be as careful * Improves directory structure - It's more natural to physically separate what is public from what are GNU social resources
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
<!-- Copyright 2008-2010 StatusNet Inc. and contributors. -->
|
||||
<!-- Document licensed under Creative Commons Attribution 3.0 Unported. See -->
|
||||
<!-- http://creativecommons.org/licenses/by/3.0/ for details. -->
|
||||
|
||||
A bookmarklet is a small piece of javascript code used as a bookmark. This one will let you post to %%site.name%% simply by selecting some text on a page and pressing the bookmarklet.
|
||||
|
||||
Drag-and-drop the following link to your bookmarks bar or right-click it and add it to your browser favorites to keep it handy.
|
||||
|
||||
<a href="javascript:(function(){var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://%%site.server%%/%%site.path%%/index.php?action=bookmarkpopup',l=d.location,e=encodeURIComponent,g=f+'&title='+((e(s))?e(s):e(document.title))+'&url='+e(l.href);function%20a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=650,height=520')){l.href=g;}}a();})()">Bookmark on %%site.name%%</a>
|
@@ -1,30 +0,0 @@
|
||||
$(document).ready(
|
||||
function() {
|
||||
var form = $('#form_new_bookmark');
|
||||
form.append('<input type="hidden" name="ajax" value="1"/>');
|
||||
function doClose() {
|
||||
self.close();
|
||||
// If in popup blocker situation, we'll have to redirect back.
|
||||
setTimeout(function() {
|
||||
window.location = $('#url').val();
|
||||
}, 100);
|
||||
}
|
||||
form.ajaxForm({dataType: 'xml',
|
||||
timeout: '60000',
|
||||
beforeSend: function(formData) {
|
||||
form.addClass('processing');
|
||||
form.find('#submit').addClass('disabled');
|
||||
},
|
||||
error: function (xhr, textStatus, errorThrown) {
|
||||
form.removeClass('processing');
|
||||
form.find('#submit').removeClass('disabled');
|
||||
doClose();
|
||||
},
|
||||
success: function(data, textStatus) {
|
||||
form.removeClass('processing');
|
||||
form.find('#submit').removeClass('disabled');
|
||||
doClose();
|
||||
}});
|
||||
|
||||
}
|
||||
);
|
@@ -1,134 +0,0 @@
|
||||
/* Bookmark specific styles */
|
||||
|
||||
.bookmark-tags li { display: inline; }
|
||||
|
||||
.bookmark h3 {
|
||||
margin: 4px 0px 8px 0px;
|
||||
}
|
||||
|
||||
.bookmark-notice-count {
|
||||
border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
padding: 1px 6px;
|
||||
font-size: 1.2em;
|
||||
line-height: 1.2em;
|
||||
background: #fff;
|
||||
border: 1px solid #7b8dbb;
|
||||
color: #3e3e8c !important;
|
||||
position: relative;
|
||||
right: 4px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.bookmark-notice-count:hover {
|
||||
text-decoration: none;
|
||||
background: #f2f2f2;
|
||||
border: 1px solid #7b8dbb;
|
||||
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.notice .bookmark-description {
|
||||
clear: both;
|
||||
margin-left: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.notice .bookmark-author {
|
||||
margin-left: 0px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.bookmark-tags {
|
||||
clear: both;
|
||||
margin-bottom: 4px;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
ul.bookmark-tags a {
|
||||
border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
padding: 1px 6px;
|
||||
background: #f2f2f2;
|
||||
color: #3e3e8c !important;
|
||||
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.5);
|
||||
font-size: 0.88em;
|
||||
}
|
||||
|
||||
ul.bookmark-tags a:hover {
|
||||
background-color: #cdd1dd;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.bookmark-avatar {
|
||||
float: none !important;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
.bookmark div.e-content {
|
||||
font-size: 0.88em;
|
||||
line-height: 1.2em;
|
||||
margin-top: 6px;
|
||||
opacity: 0.6;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.bookmark:hover div.e-content {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#bookmarkpopup {
|
||||
min-width: 600px;
|
||||
margin-top: 0px;
|
||||
height: 100%;
|
||||
border: 10px solid #364A84;
|
||||
background: #364A84;
|
||||
}
|
||||
|
||||
#bookmarkpopup #wrap {
|
||||
width: auto;
|
||||
min-width: 560px;
|
||||
padding: 40px 0px 25px 0px;
|
||||
margin-right: 2px;
|
||||
background: #fff url(../mobilelogo.png) no-repeat 6px 6px;
|
||||
}
|
||||
|
||||
#bookmarkpopup #header {
|
||||
width: auto;
|
||||
padding: 0px 10px;
|
||||
}
|
||||
|
||||
#bookmarkpopup .form_settings label {
|
||||
margin-top: 2px;
|
||||
text-align: right;
|
||||
width: 24%;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
#bookmarkpopup .form_settings .form_data input {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
#bookmarkpopup .form_guide {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
#bookmarkpopup #bookmark-submit {
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
#bookmarkpopup fieldset fieldset {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#form_initial_bookmark.form_settings .form_data li {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
#form_new_bookmark.form_settings .bookmarkform-thumbnail {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0px;
|
||||
}
|
@@ -1,36 +0,0 @@
|
||||
var Bookmark = {
|
||||
|
||||
// Special XHR that sends in some code to be run
|
||||
// when the full bookmark form gets loaded
|
||||
BookmarkXHR: function(form)
|
||||
{
|
||||
SN.U.FormXHR(form, Bookmark.InitBookmarkForm);
|
||||
return false;
|
||||
},
|
||||
|
||||
// Special initialization function just for the
|
||||
// second step in the bookmarking workflow
|
||||
InitBookmarkForm: function() {
|
||||
SN.Init.CheckBoxes();
|
||||
$('fieldset fieldset label').inFieldLabels({ fadeOpacity:0 });
|
||||
SN.Init.NoticeFormSetup($('#form_new_bookmark'));
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// Stop normal live event stuff
|
||||
$(document).off("submit", "form.ajax");
|
||||
$(document).off("click", "form.ajax input[type=submit]");
|
||||
|
||||
// Make the bookmark submit super special
|
||||
$(document).on('submit', '#form_initial_bookmark', function (e) {
|
||||
Bookmark.BookmarkXHR($(this));
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
});
|
||||
|
||||
// Restore live event stuff to other forms & submit buttons
|
||||
SN.Init.AjaxForms();
|
||||
|
||||
});
|
Reference in New Issue
Block a user