[CORE][COMPOSER] Move extlib packages with immediate composer correspondent to composer dependencies
This adds a composer.json for all dependencies that are available
23
public/js/emailsettings.js
Normal file
@@ -0,0 +1,23 @@
|
||||
$(function() {
|
||||
|
||||
function toggleIncomingOptions() {
|
||||
var enabled = $('#emailpost').prop('checked', true);
|
||||
if (enabled) {
|
||||
// Note: button style currently does not respond to disabled in our main themes.
|
||||
// Graying out the whole section with a 50% transparency will do for now. :)
|
||||
// @todo: add a general 'disabled' class style to the base themes.
|
||||
$('#emailincoming').css('opacity', '')
|
||||
.find('input').prop('disabled', false);
|
||||
} else {
|
||||
$('#emailincoming').css('opacity', '0.5')
|
||||
.find('input').prop('disabled', true);
|
||||
}
|
||||
}
|
||||
|
||||
toggleIncomingOptions();
|
||||
|
||||
$('#emailpost').click(function() {
|
||||
toggleIncomingOptions();
|
||||
});
|
||||
|
||||
});
|
1
public/js/extlib/jquery-jcrop/css/Jcrop.gif
Normal file
@@ -0,0 +1 @@
|
||||
<html><body>You are being <a href="https://raw.github.com/tapmodo/Jcrop/master/css/Jcrop.gif">redirected</a>.</body></html>
|
167
public/js/extlib/jquery-jcrop/css/jcrop.css
Normal file
@@ -0,0 +1,167 @@
|
||||
/* jquery.Jcrop.css v0.9.12 - MIT License */
|
||||
/*
|
||||
The outer-most container in a typical Jcrop instance
|
||||
If you are having difficulty with formatting related to styles
|
||||
on a parent element, place any fixes here or in a like selector
|
||||
|
||||
You can also style this element if you want to add a border, etc
|
||||
A better method for styling can be seen below with .jcrop-light
|
||||
(Add a class to the holder and style elements for that extended class)
|
||||
*/
|
||||
.jcrop-holder {
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
/* IE10 touch compatibility */
|
||||
-ms-touch-action: none;
|
||||
}
|
||||
/* Selection Border */
|
||||
.jcrop-vline,
|
||||
.jcrop-hline {
|
||||
background: #ffffff url("Jcrop.gif");
|
||||
font-size: 0;
|
||||
position: absolute;
|
||||
}
|
||||
.jcrop-vline {
|
||||
height: 100%;
|
||||
width: 1px !important;
|
||||
}
|
||||
.jcrop-vline.right {
|
||||
right: 0;
|
||||
}
|
||||
.jcrop-hline {
|
||||
height: 1px !important;
|
||||
width: 100%;
|
||||
}
|
||||
.jcrop-hline.bottom {
|
||||
bottom: 0;
|
||||
}
|
||||
/* Invisible click targets */
|
||||
.jcrop-tracker {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
/* "turn off" link highlight */
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
/* disable callout, image save panel */
|
||||
-webkit-touch-callout: none;
|
||||
/* disable cut copy paste */
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
/* Selection Handles */
|
||||
.jcrop-handle {
|
||||
background-color: #333333;
|
||||
border: 1px #eeeeee solid;
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
font-size: 1px;
|
||||
}
|
||||
.jcrop-handle.ord-n {
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -4px;
|
||||
top: 0;
|
||||
}
|
||||
.jcrop-handle.ord-s {
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
margin-bottom: -4px;
|
||||
margin-left: -4px;
|
||||
}
|
||||
.jcrop-handle.ord-e {
|
||||
margin-right: -4px;
|
||||
margin-top: -4px;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
}
|
||||
.jcrop-handle.ord-w {
|
||||
left: 0;
|
||||
margin-left: -4px;
|
||||
margin-top: -4px;
|
||||
top: 50%;
|
||||
}
|
||||
.jcrop-handle.ord-nw {
|
||||
left: 0;
|
||||
margin-left: -4px;
|
||||
margin-top: -4px;
|
||||
top: 0;
|
||||
}
|
||||
.jcrop-handle.ord-ne {
|
||||
margin-right: -4px;
|
||||
margin-top: -4px;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
.jcrop-handle.ord-se {
|
||||
bottom: 0;
|
||||
margin-bottom: -4px;
|
||||
margin-right: -4px;
|
||||
right: 0;
|
||||
}
|
||||
.jcrop-handle.ord-sw {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
margin-bottom: -4px;
|
||||
margin-left: -4px;
|
||||
}
|
||||
/* Dragbars */
|
||||
.jcrop-dragbar.ord-n,
|
||||
.jcrop-dragbar.ord-s {
|
||||
height: 7px;
|
||||
width: 100%;
|
||||
}
|
||||
.jcrop-dragbar.ord-e,
|
||||
.jcrop-dragbar.ord-w {
|
||||
height: 100%;
|
||||
width: 7px;
|
||||
}
|
||||
.jcrop-dragbar.ord-n {
|
||||
margin-top: -4px;
|
||||
}
|
||||
.jcrop-dragbar.ord-s {
|
||||
bottom: 0;
|
||||
margin-bottom: -4px;
|
||||
}
|
||||
.jcrop-dragbar.ord-e {
|
||||
margin-right: -4px;
|
||||
right: 0;
|
||||
}
|
||||
.jcrop-dragbar.ord-w {
|
||||
margin-left: -4px;
|
||||
}
|
||||
/* The "jcrop-light" class/extension */
|
||||
.jcrop-light .jcrop-vline,
|
||||
.jcrop-light .jcrop-hline {
|
||||
background: #ffffff;
|
||||
filter: alpha(opacity=70) !important;
|
||||
opacity: .70!important;
|
||||
}
|
||||
.jcrop-light .jcrop-handle {
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
background-color: #000000;
|
||||
border-color: #ffffff;
|
||||
border-radius: 3px;
|
||||
}
|
||||
/* The "jcrop-dark" class/extension */
|
||||
.jcrop-dark .jcrop-vline,
|
||||
.jcrop-dark .jcrop-hline {
|
||||
background: #000000;
|
||||
filter: alpha(opacity=70) !important;
|
||||
opacity: 0.7 !important;
|
||||
}
|
||||
.jcrop-dark .jcrop-handle {
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
background-color: #ffffff;
|
||||
border-color: #000000;
|
||||
border-radius: 3px;
|
||||
}
|
||||
/* Simple macro to turn off the antlines */
|
||||
.solid-line .jcrop-vline,
|
||||
.solid-line .jcrop-hline {
|
||||
background: #ffffff;
|
||||
}
|
||||
/* Fix for twitter bootstrap et al. */
|
||||
.jcrop-holder img,
|
||||
img.jcrop-preview {
|
||||
max-width: none;
|
||||
}
|
29
public/js/extlib/jquery-jcrop/css/jcrop.min.css
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/* jquery.Jcrop.min.css v0.9.12 (build:20130521) */
|
||||
.jcrop-holder{-ms-touch-action:none;direction:ltr;text-align:left;}
|
||||
.jcrop-vline,.jcrop-hline{background:#FFF url(Jcrop.gif);font-size:0;position:absolute;}
|
||||
.jcrop-vline{height:100%;width:1px!important;}
|
||||
.jcrop-vline.right{right:0;}
|
||||
.jcrop-hline{height:1px!important;width:100%;}
|
||||
.jcrop-hline.bottom{bottom:0;}
|
||||
.jcrop-tracker{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;height:100%;width:100%;}
|
||||
.jcrop-handle{background-color:#333;border:1px #EEE solid;font-size:1px;height:7px;width:7px;}
|
||||
.jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0;}
|
||||
.jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px;}
|
||||
.jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%;}
|
||||
.jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%;}
|
||||
.jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0;}
|
||||
.jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0;}
|
||||
.jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0;}
|
||||
.jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px;}
|
||||
.jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%;}
|
||||
.jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px;}
|
||||
.jcrop-dragbar.ord-n{margin-top:-4px;}
|
||||
.jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px;}
|
||||
.jcrop-dragbar.ord-e{margin-right:-4px;right:0;}
|
||||
.jcrop-dragbar.ord-w{margin-left:-4px;}
|
||||
.jcrop-light .jcrop-vline,.jcrop-light .jcrop-hline{background:#FFF;filter:alpha(opacity=70)!important;opacity:.70!important;}
|
||||
.jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px;}
|
||||
.jcrop-dark .jcrop-vline,.jcrop-dark .jcrop-hline{background:#000;filter:alpha(opacity=70)!important;opacity:.7!important;}
|
||||
.jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px;}
|
||||
.solid-line .jcrop-vline,.solid-line .jcrop-hline{background:#FFF;}
|
||||
.jcrop-holder img,img.jcrop-preview{max-width:none;}
|
1694
public/js/extlib/jquery-jcrop/jcrop.js
vendored
Normal file
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 208 B |
After Width: | Height: | Size: 335 B |
After Width: | Height: | Size: 207 B |
After Width: | Height: | Size: 262 B |
After Width: | Height: | Size: 262 B |
After Width: | Height: | Size: 332 B |
After Width: | Height: | Size: 280 B |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 4.4 KiB |
1225
public/js/extlib/jquery-ui/css/smoothness/jquery-ui.css
vendored
Normal file
16607
public/js/extlib/jquery-ui/jquery-ui.js
vendored
Normal file
117
public/js/extlib/jquery.cookie.js
Normal file
@@ -0,0 +1,117 @@
|
||||
/*!
|
||||
* jQuery Cookie Plugin v1.4.1
|
||||
* https://github.com/carhartl/jquery-cookie
|
||||
*
|
||||
* Copyright 2013 Klaus Hartl
|
||||
* Released under the MIT license
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
// CommonJS
|
||||
factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
|
||||
var pluses = /\+/g;
|
||||
|
||||
function encode(s) {
|
||||
return config.raw ? s : encodeURIComponent(s);
|
||||
}
|
||||
|
||||
function decode(s) {
|
||||
return config.raw ? s : decodeURIComponent(s);
|
||||
}
|
||||
|
||||
function stringifyCookieValue(value) {
|
||||
return encode(config.json ? JSON.stringify(value) : String(value));
|
||||
}
|
||||
|
||||
function parseCookieValue(s) {
|
||||
if (s.indexOf('"') === 0) {
|
||||
// This is a quoted cookie as according to RFC2068, unescape...
|
||||
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
||||
}
|
||||
|
||||
try {
|
||||
// Replace server-side written pluses with spaces.
|
||||
// If we can't decode the cookie, ignore it, it's unusable.
|
||||
// If we can't parse the cookie, ignore it, it's unusable.
|
||||
s = decodeURIComponent(s.replace(pluses, ' '));
|
||||
return config.json ? JSON.parse(s) : s;
|
||||
} catch(e) {}
|
||||
}
|
||||
|
||||
function read(s, converter) {
|
||||
var value = config.raw ? s : parseCookieValue(s);
|
||||
return $.isFunction(converter) ? converter(value) : value;
|
||||
}
|
||||
|
||||
var config = $.cookie = function (key, value, options) {
|
||||
|
||||
// Write
|
||||
|
||||
if (value !== undefined && !$.isFunction(value)) {
|
||||
options = $.extend({}, config.defaults, options);
|
||||
|
||||
if (typeof options.expires === 'number') {
|
||||
var days = options.expires, t = options.expires = new Date();
|
||||
t.setTime(+t + days * 864e+5);
|
||||
}
|
||||
|
||||
return (document.cookie = [
|
||||
encode(key), '=', stringifyCookieValue(value),
|
||||
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
||||
options.path ? '; path=' + options.path : '',
|
||||
options.domain ? '; domain=' + options.domain : '',
|
||||
options.secure ? '; secure' : ''
|
||||
].join(''));
|
||||
}
|
||||
|
||||
// Read
|
||||
|
||||
var result = key ? undefined : {};
|
||||
|
||||
// To prevent the for loop in the first place assign an empty array
|
||||
// in case there are no cookies at all. Also prevents odd result when
|
||||
// calling $.cookie().
|
||||
var cookies = document.cookie ? document.cookie.split('; ') : [];
|
||||
|
||||
for (var i = 0, l = cookies.length; i < l; i++) {
|
||||
var parts = cookies[i].split('=');
|
||||
var name = decode(parts.shift());
|
||||
var cookie = parts.join('=');
|
||||
|
||||
if (key && key === name) {
|
||||
// If second argument (value) is a function it's a converter...
|
||||
result = read(cookie, value);
|
||||
break;
|
||||
}
|
||||
|
||||
// Prevent storing a cookie that we couldn't decode.
|
||||
if (!key && (cookie = read(cookie)) !== undefined) {
|
||||
result[name] = cookie;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
config.defaults = {};
|
||||
|
||||
$.removeCookie = function (key, options) {
|
||||
if ($.cookie(key) === undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Must not alter options, thus extending a fresh object...
|
||||
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
|
||||
return !$.cookie(key);
|
||||
};
|
||||
|
||||
}));
|
1277
public/js/extlib/jquery.form.js
Normal file
9209
public/js/extlib/jquery.js
vendored
Normal file
367
public/js/identica-badge.js
Normal file
@@ -0,0 +1,367 @@
|
||||
// identica badge -- updated to work with the native API, 12-4-2008
|
||||
// Modified to point to Identi.ca, 2-20-2009 by Zach
|
||||
// Modified for XHTML, 27-9-2009 by Will Daniels
|
||||
// (see http://willdaniels.co.uk/blog/tech-stuff/26-identica-badge-xhtml)
|
||||
// copyright Kent Brewster 2008
|
||||
// see http://kentbrewster.com/identica-badge for info
|
||||
|
||||
function createHTMLElement(tagName) {
|
||||
if(document.createElementNS)
|
||||
var elem = document.createElementNS("http://www.w3.org/1999/xhtml", tagName);
|
||||
else
|
||||
var elem = document.createElement(tagName);
|
||||
|
||||
return elem;
|
||||
}
|
||||
|
||||
function isNumeric(value) {
|
||||
if (value == null || !value.toString().match(/^[-]?\d*\.?\d*$/)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
function markupPost(raw, server) {
|
||||
var start = 0; var p = createHTMLElement('p');
|
||||
|
||||
raw.replace(/((http|https):\/\/|\!|@|#)(([\w_]+)?[^\s]*)/g,
|
||||
function(sub, type, scheme, url, word, offset, full)
|
||||
{
|
||||
if(!scheme && !word) return; // just punctuation
|
||||
var label = ''; var href = '';
|
||||
var pretext = full.substr(start, offset - start);
|
||||
|
||||
moniker = word.split('_'); // behaviour with underscores differs
|
||||
if(type == '#') moniker = moniker.join('');
|
||||
else word = moniker = moniker[0].toLowerCase();
|
||||
|
||||
switch(type) {
|
||||
case 'http://': case 'https://': // html links
|
||||
href = scheme + '://' + url; break;
|
||||
case '@': // link users
|
||||
href = 'http://' + server + '/' + moniker; break;
|
||||
case '!': // link groups
|
||||
href = 'http://' + server + '/group/' + moniker; break;
|
||||
case '#': // link tags
|
||||
href = 'http://' + server + '/tag/' + moniker; break;
|
||||
default: // bad call (just reset position for text)
|
||||
start = offset;
|
||||
}
|
||||
if(scheme) { // only urls will have scheme
|
||||
label = sub; start = offset + sub.length;
|
||||
} else {
|
||||
label = word; pretext += type;
|
||||
start = offset + word.length + type.length;
|
||||
}
|
||||
p.appendChild(document.createTextNode(pretext));
|
||||
|
||||
var link = createHTMLElement('a');
|
||||
link.appendChild(document.createTextNode(label));
|
||||
link.href = href; link.target = '_statusnet';
|
||||
p.appendChild(link);
|
||||
});
|
||||
|
||||
if(start != raw.length) {
|
||||
endtext = raw.substr(start);
|
||||
p.appendChild(document.createTextNode(endtext));
|
||||
}
|
||||
return p;
|
||||
}
|
||||
(function() {
|
||||
var trueName = '';
|
||||
for (var i = 0; i < 16; i++) {
|
||||
trueName += String.fromCharCode(Math.floor(Math.random() * 26) + 97);
|
||||
}
|
||||
window[trueName] = {};
|
||||
var $ = window[trueName];
|
||||
$.f = function() {
|
||||
return {
|
||||
runFunction : [],
|
||||
init : function(target) {
|
||||
var theScripts = document.getElementsByTagName('script');
|
||||
for (var i = 0; i < theScripts.length; i++) {
|
||||
if (theScripts[i].src.match(target)) {
|
||||
$.a = {};
|
||||
if (theScripts[i].innerHTML) {
|
||||
$.a = $.f.parseJson(theScripts[i].innerHTML);
|
||||
}
|
||||
if ($.a.err) {
|
||||
alert('bad json!');
|
||||
}
|
||||
$.f.loadDefaults();
|
||||
$.f.buildStructure();
|
||||
$.f.buildPresentation();
|
||||
theScripts[i].parentNode.insertBefore($.s, theScripts[i]);
|
||||
theScripts[i].parentNode.removeChild(theScripts[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
parseJson : function(json) {
|
||||
this.parseJson.data = json;
|
||||
if ( typeof json !== 'string') {
|
||||
return {"err":"trying to parse a non-string JSON object"};
|
||||
}
|
||||
try {
|
||||
var f = Function(['var document,top,self,window,parent,Number,Date,Object,Function,',
|
||||
'Array,String,Math,RegExp,Image,ActiveXObject;',
|
||||
'return (' , json.replace(/<\!--.+-->/gim,'').replace(/\bfunction\b/g,'function­') , ');'].join(''));
|
||||
return f();
|
||||
} catch (e) {
|
||||
return {"err":"trouble parsing JSON object"};
|
||||
}
|
||||
},
|
||||
loadDefaults : function() {
|
||||
$.d = {
|
||||
"user":"7000",
|
||||
"headerText" : "",
|
||||
"height" : 350,
|
||||
"width" : 300,
|
||||
"background" : "#193441",
|
||||
"border" : "1px solid black",
|
||||
"userFontSize" : "inherit",
|
||||
"userColor" : "inherit",
|
||||
"headerBackground" : "transparent",
|
||||
"headerColor" : "white",
|
||||
"evenBackground" : "#fff",
|
||||
"oddBackground" : "#eee",
|
||||
"thumbnailBorder" : "1px solid black",
|
||||
"thumbnailSize" : 24,
|
||||
"padding" : 3,
|
||||
"server" : "identi.ca"
|
||||
};
|
||||
for (var k in $.d) { if ($.a[k] === undefined) { $.a[k] = $.d[k]; } }
|
||||
// fix inout units
|
||||
if(isNumeric($.a.width)) {
|
||||
$.a.innerWidth = ($.a.width - 22) + 'px'; $.a.width += 'px';
|
||||
} else {
|
||||
$.a.innerWidth = 'auto';
|
||||
}
|
||||
if(isNumeric($.a.height)) $.a.height += 'px';
|
||||
},
|
||||
buildPresentation : function () {
|
||||
var setZoom = ''; if(navigator.appName == 'Microsoft Internet Explorer') setZoom = 'zoom:1;';
|
||||
var ns = createHTMLElement('style');
|
||||
document.getElementsByTagName('head')[0].appendChild(ns);
|
||||
if (!window.createPopup) {
|
||||
ns.appendChild(document.createTextNode(''));
|
||||
ns.setAttribute("type", "text/css");
|
||||
}
|
||||
var s = document.styleSheets[document.styleSheets.length - 1];
|
||||
var rules = {
|
||||
"" : "{margin:0px;padding:0px;width:" + $.a.width + ";background:" + $.a.background + ";border:" + $.a.border + ";font:87%/1.2em tahoma, veranda, arial, helvetica, clean, sans-serif;}",
|
||||
"a" : "{cursor:pointer;text-decoration:none;}",
|
||||
"a:hover" : "{text-decoration:underline;}",
|
||||
".cite" : "{" + setZoom + "font-weight:bold;margin:0px 0px 0px 4px;padding:0px;display:block;font-style:normal;line-height:" + ($.a.thumbnailSize/2) + "px;vertical-align:middle;}",
|
||||
".cite a" : "{color:#C15D42;}",
|
||||
".date":"{margin:0px 0px 0px 4px;padding:0px;display:block;font-style:normal;line-height:" + ($.a.thumbnailSize/2) + "px;vertical-align:middle;}",
|
||||
".date:after" : "{clear:both;content:\".\"; display:block;height:0px;visibility:hidden;}",
|
||||
".date a" : "{color:#676;}",
|
||||
"h3" : "{margin:0px;padding:" + $.a.padding + "px;font-weight:bold;background:" + $.a.headerBackground + " url('http://" + $.a.server + "/favicon.ico') " + $.a.padding + "px 50% no-repeat;padding-left:" + ($.a.padding + 20) + "px;}",
|
||||
"h3.loading" : "{background-image:url('http://l.yimg.com/us.yimg.com/i/us/my/mw/anim_loading_sm.gif');}",
|
||||
"h3 a" : "{font-size:92%; color:" + $.a.headerColor + ";}",
|
||||
"h4" : "{font-weight:normal;background:" + $.a.headerBackground + ";text-align:right;margin:0px;padding:" + $.a.padding + "px;}",
|
||||
"h4 a" : "{font-size:92%; color:" + $.a.headerColor + ";}",
|
||||
"img":"{float:left;height:" + $.a.thumbnailSize + "px;width:" + $.a.thumbnailSize + "px;border:" + $.a.thumbnailBorder + ";margin-right:" + $.a.padding + "px;}",
|
||||
"p" : "{margin:2px 0px 0px 0px;padding:0px;width:" + $.a.innerWidth + ";overflow:hidden;line-height:normal;}",
|
||||
"p a" : "{color:#C15D42;}",
|
||||
"ul":"{margin:0px; padding:0px; height:" + $.a.height + ";width:" + $.a.innerWidth + ";overflow:auto;}",
|
||||
"ul li":"{background:" + $.a.evenBackground + ";margin:0px;padding:" + $.a.padding + "px;list-style:none;width:auto;overflow:hidden;border-bottom:1px solid #D8E2D7;}",
|
||||
"ul li:hover":"{background:#f3f8ea;}"
|
||||
};
|
||||
var ieRules = "";
|
||||
// brute-force each and every style rule here to !important
|
||||
// sometimes you have to take off and nuke the site from orbit; it's the only way to be sure
|
||||
for (var z in rules) {
|
||||
if(z.charAt(0)=='.') var selector = '.' + trueName + '-' + z.substring(1);
|
||||
else var selector = '.' + trueName + ' ' + z;
|
||||
var rule = rules[z];
|
||||
if (typeof rule === 'string') {
|
||||
var important = rule.replace(/;/gi, '!important;');
|
||||
if (!window.createPopup) {
|
||||
var theRule = document.createTextNode(selector + important + '\n');
|
||||
ns.appendChild(theRule);
|
||||
} else {
|
||||
ieRules += selector + important;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (window.createPopup) { s.cssText = ieRules; }
|
||||
},
|
||||
buildStructure : function() {
|
||||
$.s = createHTMLElement('div');
|
||||
$.s.className = trueName;
|
||||
$.s.h = createHTMLElement('h3');
|
||||
$.s.h.a = createHTMLElement('a');
|
||||
$.s.h.a.target = '_statusnet';
|
||||
$.s.h.appendChild($.s.h.a);
|
||||
$.s.appendChild($.s.h);
|
||||
$.s.r = createHTMLElement('ul');
|
||||
$.s.appendChild($.s.r);
|
||||
$.s.f = createHTMLElement('h4');
|
||||
var a = createHTMLElement('a');
|
||||
a.innerHTML = 'get this';
|
||||
a.target = '_blank';
|
||||
a.href = 'http://identi.ca/doc/badge';
|
||||
$.s.f.appendChild(a);
|
||||
$.s.appendChild($.s.f);
|
||||
$.f.getUser();
|
||||
},
|
||||
getUser : function() {
|
||||
if (!$.f.runFunction) { $.f.runFunction = []; }
|
||||
var n = $.f.runFunction.length;
|
||||
var id = trueName + '.f.runFunction[' + n + ']';
|
||||
$.f.runFunction[n] = function(r) {
|
||||
delete($.f.runFunction[n]);
|
||||
var a = createHTMLElement('a');
|
||||
a.rel = $.a.user;
|
||||
a.rev = r.name;
|
||||
a.id = r.screen_name;
|
||||
$.f.removeScript(id);
|
||||
$.f.changeUserTo(a);
|
||||
};
|
||||
var url = 'http://' + $.a.server + '/api/users/show/' + $.a.user + '.json?callback=' + id;
|
||||
$.f.runScript(url, id);
|
||||
},
|
||||
changeUserTo : function(el) {
|
||||
$.a.user = el.rel;
|
||||
$.s.h.a.appendChild(document.createTextNode(el.rev + $.a.headerText));
|
||||
$.s.h.a.href = 'http://' + $.a.server + '/' + el.id;
|
||||
$.f.runSearch();
|
||||
},
|
||||
runSearch : function() {
|
||||
$.s.h.className = 'loading';
|
||||
$.s.r.innerHTML = '';
|
||||
if (!$.f.runFunction) { $.f.runFunction = []; }
|
||||
var n = $.f.runFunction.length;
|
||||
var id = trueName + '.f.runFunction[' + n + ']';
|
||||
$.f.runFunction[n] = function(r) {
|
||||
delete($.f.runFunction[n]);
|
||||
$.f.removeScript(id);
|
||||
$.f.renderResult(r);
|
||||
};
|
||||
var url = 'http://' + $.a.server + '/api/statuses/friends/' + $.a.user + '.json?callback=' + id;
|
||||
$.f.runScript(url, id);
|
||||
},
|
||||
renderResult: function(r) {
|
||||
for (var i = 0; i < r.length; i++) {
|
||||
if (!r[i].status) {
|
||||
r.splice(i, 1);
|
||||
} else {
|
||||
r[i].status_id = parseInt(r[i].status.id);
|
||||
}
|
||||
}
|
||||
r = $.f.sortArray(r, "status_id", true);
|
||||
$.s.h.className = ''; // for IE6
|
||||
$.s.h.removeAttribute('class');
|
||||
for (var i = 0; i < r.length; i++) {
|
||||
var li = createHTMLElement('li');
|
||||
var icon = createHTMLElement('a');
|
||||
if (r[i] && r[i].url) {
|
||||
icon.href = r[i].url;
|
||||
icon.target = '_statusnet';
|
||||
icon.title = 'Visit ' + r[i].screen_name + ' at ' + r[i].url;
|
||||
} else {
|
||||
icon.href = 'http://' + $.a.server + '/' + r[i].screen_name;
|
||||
icon.target = '_statusnet';
|
||||
icon.title = 'Visit ' + r[i].screen_name + ' at http://' + $.a.server + '/' + r[i].screen_name;
|
||||
}
|
||||
|
||||
var img = createHTMLElement('img');
|
||||
img.alt = 'profile image for ' + r[i].screen_name;
|
||||
img.src = r[i].profile_image_url;
|
||||
icon.appendChild(img);
|
||||
li.appendChild(icon);
|
||||
|
||||
var user = createHTMLElement('span');
|
||||
user.className = trueName + '-cite';
|
||||
var a = createHTMLElement('a');
|
||||
a.rel = r[i].id;
|
||||
a.rev = r[i].name;
|
||||
a.id = r[i].screen_name;
|
||||
a.innerHTML = r[i].name;
|
||||
a.href = 'http://' + $.a.server + '/' + r[i].screen_name;
|
||||
a.onclick = function() {
|
||||
$.f.changeUserTo(this);
|
||||
return false;
|
||||
};
|
||||
user.appendChild(a);
|
||||
li.appendChild(user);
|
||||
var updated = createHTMLElement('span');
|
||||
updated.className = trueName + '-date';
|
||||
if (r[i].status && r[i].status.created_at) {
|
||||
var date_link = createHTMLElement('a');
|
||||
date_link.innerHTML = r[i].status.created_at.split(/\+/)[0];
|
||||
date_link.href = 'http://' + $.a.server + '/notice/' + r[i].status.id;
|
||||
date_link.target = '_statusnet';
|
||||
updated.appendChild(date_link);
|
||||
if (r[i].status.in_reply_to_status_id) {
|
||||
updated.appendChild(document.createTextNode(' in reply to '));
|
||||
var in_reply_to = createHTMLElement('a');
|
||||
in_reply_to.innerHTML = r[i].status.in_reply_to_status_id;
|
||||
in_reply_to.href = 'http://' + $.a.server + '/notice/' + r[i].status.in_reply_to_status_id;
|
||||
in_reply_to.target = '_statusnet';
|
||||
updated.appendChild(in_reply_to);
|
||||
}
|
||||
} else {
|
||||
updated.innerHTML = 'has not updated yet';
|
||||
}
|
||||
li.appendChild(updated);
|
||||
var p = createHTMLElement('p');
|
||||
if (r[i].status && r[i].status.text) {
|
||||
var raw = r[i].status.text;
|
||||
p = markupPost(raw, $.a.server);
|
||||
}
|
||||
li.appendChild(p);
|
||||
var a = p.getElementsByTagName('a');
|
||||
for (var j = 0; j < a.length; j++) {
|
||||
if (a[j].className == 'changeUserTo') {
|
||||
a[j].removeAttribute('class');
|
||||
a[j].href = 'http://' + $.a.server + '/' + a[j].innerHTML;
|
||||
a[j].rel = a[j].innerHTML;
|
||||
a[j].onclick = function() {
|
||||
$.f.changeUserTo(this);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
$.s.r.appendChild(li);
|
||||
}
|
||||
},
|
||||
sortArray : function(r, k, x) {
|
||||
if (window.createPopup) {
|
||||
return r;
|
||||
}
|
||||
function s(a, b) {
|
||||
if (x === true) {
|
||||
return b[k] - a[k];
|
||||
} else {
|
||||
return a[k] - b[k];
|
||||
}
|
||||
}
|
||||
r = r.sort(s);
|
||||
return r;
|
||||
},
|
||||
runScript : function(url, id) {
|
||||
var s = createHTMLElement('script');
|
||||
s.id = id;
|
||||
s.type ='text/javascript';
|
||||
s.src = url;
|
||||
document.getElementsByTagName('body')[0].appendChild(s);
|
||||
},
|
||||
removeScript : function(id) {
|
||||
if (document.getElementById(id)) {
|
||||
var s = document.getElementById(id);
|
||||
s.parentNode.removeChild(s);
|
||||
}
|
||||
}
|
||||
};
|
||||
}();
|
||||
// var thisScript = /^https?:\/\/[^\/]*r8ar.com\/identica-badge.js$/;
|
||||
var thisScript = /identica-badge.js$/;
|
||||
if(typeof window.addEventListener !== 'undefined') {
|
||||
window.addEventListener('load', function() { $.f.init(thisScript); }, false);
|
||||
} else if(typeof window.attachEvent !== 'undefined') {
|
||||
window.attachEvent('onload', function() { $.f.init(thisScript); });
|
||||
}
|
||||
} )();
|
||||
|
||||
|
18
public/js/install.js
Normal file
@@ -0,0 +1,18 @@
|
||||
$(function() {
|
||||
$.ajax({url:'check-fancy',
|
||||
type:'GET',
|
||||
success:function(data, textStatus) {
|
||||
$('#fancy-enable').prop('checked', true);
|
||||
$('#fancy-disable').prop('checked', false);
|
||||
$('#fancy-form_guide').text(data);
|
||||
},
|
||||
error:function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
$('#fancy-enable').prop('checked', false);
|
||||
$('#fancy-disable').prop('checked', true);
|
||||
$('#fancy-enable').prop('disabled', true);
|
||||
$('#fancy-disable').prop('disabled', true);
|
||||
$('#fancy-form_guide').text("Fancy URL support detection failed, disabling this option. Make sure you renamed htaccess.sample to .htaccess.");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
50
public/js/jcrop.go.js
Normal file
@@ -0,0 +1,50 @@
|
||||
/** Init for Jcrop library and page setup
|
||||
*
|
||||
* @package StatusNet
|
||||
* @author Sarven Capadisli <csarven@status.net>
|
||||
* @author Mikael Nordfeldth <mmn@hethane.se>
|
||||
* @copyright 2009 StatusNet, Inc.
|
||||
* @copyright 2013 Free Software Foundation, Inc.
|
||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
$(function(){
|
||||
var x = ($('#avatar_crop_x').val()) ? $('#avatar_crop_x').val() : 0;
|
||||
var y = ($('#avatar_crop_y').val()) ? $('#avatar_crop_y').val() : 0;
|
||||
var w = ($('#avatar_crop_w').val()) ? $('#avatar_crop_w').val() : $("#avatar_original img").attr("width");
|
||||
var h = ($('#avatar_crop_h').val()) ? $('#avatar_crop_h').val() : $("#avatar_original img").attr("height");
|
||||
|
||||
$("#avatar_original img").Jcrop({
|
||||
onChange: showPreview,
|
||||
setSelect: [ x, y, w, h ],
|
||||
onSelect: updateCoords,
|
||||
aspectRatio: 1,
|
||||
boxWidth: 480,
|
||||
boxHeight: 480,
|
||||
bgColor: '#000',
|
||||
bgOpacity: .4
|
||||
});
|
||||
});
|
||||
|
||||
function showPreview(coords) {
|
||||
var rx = 96 / coords.w;
|
||||
var ry = 96 / coords.h;
|
||||
|
||||
var img_width = $("#avatar_original img").attr("width");
|
||||
var img_height = $("#avatar_original img").attr("height");
|
||||
|
||||
$('#avatar_preview img').css({
|
||||
width: Math.round(rx *img_width) + 'px',
|
||||
height: Math.round(ry * img_height) + 'px',
|
||||
marginLeft: '-' + Math.round(rx * coords.x) + 'px',
|
||||
marginTop: '-' + Math.round(ry * coords.y) + 'px'
|
||||
});
|
||||
};
|
||||
|
||||
function updateCoords(c) {
|
||||
$('#avatar_crop_x').val(c.x);
|
||||
$('#avatar_crop_y').val(c.y);
|
||||
$('#avatar_crop_w').val(c.w);
|
||||
$('#avatar_crop_h').val(c.h);
|
||||
};
|
1691
public/js/util.js
Normal file
47
public/js/xbImportNode.js
Normal file
@@ -0,0 +1,47 @@
|
||||
/* is this stuff defined? */
|
||||
if (!document.ELEMENT_NODE) {
|
||||
document.ELEMENT_NODE = 1;
|
||||
document.ATTRIBUTE_NODE = 2;
|
||||
document.TEXT_NODE = 3;
|
||||
document.CDATA_SECTION_NODE = 4;
|
||||
document.ENTITY_REFERENCE_NODE = 5;
|
||||
document.ENTITY_NODE = 6;
|
||||
document.PROCESSING_INSTRUCTION_NODE = 7;
|
||||
document.COMMENT_NODE = 8;
|
||||
document.DOCUMENT_NODE = 9;
|
||||
document.DOCUMENT_TYPE_NODE = 10;
|
||||
document.DOCUMENT_FRAGMENT_NODE = 11;
|
||||
document.NOTATION_NODE = 12;
|
||||
}
|
||||
|
||||
document._importNode = function(node, allChildren) {
|
||||
/* find the node type to import */
|
||||
switch (node.nodeType) {
|
||||
case document.ELEMENT_NODE:
|
||||
/* create a new element */
|
||||
var newNode = document.createElement(node.nodeName);
|
||||
/* does the node have any attributes to add? */
|
||||
if (node.attributes && node.attributes.length > 0)
|
||||
/* add all of the attributes */
|
||||
for (var i = 0, il = node.attributes.length; i < il;) {
|
||||
if (node.attributes[i].nodeName == 'class') {
|
||||
newNode.className = node.getAttribute(node.attributes[i++].nodeName);
|
||||
} else {
|
||||
newNode.setAttribute(node.attributes[i].nodeName, node.getAttribute(node.attributes[i++].nodeName));
|
||||
}
|
||||
}
|
||||
/* are we going after children too, and does the node have any? */
|
||||
if (allChildren && node.childNodes && node.childNodes.length > 0)
|
||||
/* recursively get all of the child nodes */
|
||||
for (var i = 0, il = node.childNodes.length; i < il;)
|
||||
newNode.appendChild(document._importNode(node.childNodes[i++], allChildren));
|
||||
return newNode;
|
||||
break;
|
||||
case document.TEXT_NODE:
|
||||
case document.CDATA_SECTION_NODE:
|
||||
case document.COMMENT_NODE:
|
||||
return document.createTextNode(node.nodeValue);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|