Merge https://github.com/friendica/red into pending_merge
This commit is contained in:
commit
0b6415e73d
2
library/jRange/jquery.range-min.js
vendored
2
library/jRange/jquery.range-min.js
vendored
File diff suppressed because one or more lines are too long
@ -19,6 +19,9 @@
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
.slider-container .back-bar .pointer.last-active {
|
||||||
|
z-index: 3;
|
||||||
|
}
|
||||||
.slider-container .back-bar .pointer-label {
|
.slider-container .back-bar .pointer-label {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -17px;
|
top: -17px;
|
||||||
|
@ -33,7 +33,9 @@
|
|||||||
step : 1,
|
step : 1,
|
||||||
format: '%s',
|
format: '%s',
|
||||||
theme : 'theme-green',
|
theme : 'theme-green',
|
||||||
width : 300
|
width : 300,
|
||||||
|
minRange: 0,
|
||||||
|
maxRange: 'auto'
|
||||||
},
|
},
|
||||||
template : '<div class="slider-container">\
|
template : '<div class="slider-container">\
|
||||||
<div class="back-bar">\
|
<div class="back-bar">\
|
||||||
@ -103,7 +105,8 @@
|
|||||||
if(e.which !== 1){return;}
|
if(e.which !== 1){return;}
|
||||||
e.stopPropagation(); e.preventDefault();
|
e.stopPropagation(); e.preventDefault();
|
||||||
var pointer = $(e.target);
|
var pointer = $(e.target);
|
||||||
pointer.addClass('focused');
|
this.pointers.removeClass('last-active');
|
||||||
|
pointer.addClass('focused last-active');
|
||||||
this[(pointer.hasClass('low')?'low':'high') + 'Label'].addClass('focused');
|
this[(pointer.hasClass('low')?'low':'high') + 'Label'].addClass('focused');
|
||||||
$(document).on('mousemove.slider', $.proxy(this.onDrag, this, pointer));
|
$(document).on('mousemove.slider', $.proxy(this.onDrag, this, pointer));
|
||||||
$(document).on('mouseup.slider', $.proxy(this.onDragEnd, this));
|
$(document).on('mouseup.slider', $.proxy(this.onDragEnd, this));
|
||||||
@ -280,6 +283,7 @@
|
|||||||
options = typeof option === 'object' && option;
|
options = typeof option === 'object' && option;
|
||||||
if (!data) {
|
if (!data) {
|
||||||
$this.data('plugin_' + pluginName, (data = new jRange(this, options)));
|
$this.data('plugin_' + pluginName, (data = new jRange(this, options)));
|
||||||
|
$(window).resize(function() { data.setValue(data.getValue()); }); // Update slider position when window is resized to keep it in sync with scale
|
||||||
}
|
}
|
||||||
// if first argument is a string, call silimarly named function
|
// if first argument is a string, call silimarly named function
|
||||||
// this gives flexibility to call functions of the plugin e.g.
|
// this gives flexibility to call functions of the plugin e.g.
|
||||||
@ -294,4 +298,4 @@
|
|||||||
return result || this;
|
return result || this;
|
||||||
};
|
};
|
||||||
|
|
||||||
})(jQuery, window, document);
|
})(jQuery, window, document);
|
||||||
|
@ -73,6 +73,9 @@
|
|||||||
cursor: move;
|
cursor: move;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
&.last-active{
|
||||||
|
z-index: 3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.pointer-label {
|
.pointer-label {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -124,9 +124,8 @@ if (typeof jQuery === 'undefined') {
|
|||||||
this.views = [];
|
this.views = [];
|
||||||
this.option = $.extend({}, Completer._getDefaults(), option);
|
this.option = $.extend({}, Completer._getDefaults(), option);
|
||||||
|
|
||||||
|
|
||||||
if (!this.$el.is('input[type=text]') && !this.$el.is('textarea') && !element.isContentEditable && element.contentEditable != 'true') {
|
if (!this.$el.is('input[type=text]') && !this.$el.is('textarea') && !element.isContentEditable && element.contentEditable != 'true') {
|
||||||
throw new Error('textcomplete must be called on a input[type=text], Textarea or a ContentEditable.');
|
throw new Error('textcomplete must be called on a Textarea or a ContentEditable.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (element === document.activeElement) {
|
if (element === document.activeElement) {
|
||||||
@ -414,6 +413,22 @@ if (typeof jQuery === 'undefined') {
|
|||||||
|
|
||||||
setPosition: function (position) {
|
setPosition: function (position) {
|
||||||
this.$el.css(this._applyPlacement(position));
|
this.$el.css(this._applyPlacement(position));
|
||||||
|
|
||||||
|
// Make the dropdown fixed if the input is also fixed
|
||||||
|
// This can't be done during init, as textcomplete may be used on multiple elements on the same page
|
||||||
|
// Because the same dropdown is reused behind the scenes, we need to recheck every time the dropdown is showed
|
||||||
|
var position = 'absolute';
|
||||||
|
// Check if input or one of its parents has positioning we need to care about
|
||||||
|
this.$inputEl.add(this.$inputEl.parents()).each(function() {
|
||||||
|
if($(this).css('position') === 'absolute') // The element has absolute positioning, so it's all OK
|
||||||
|
return false;
|
||||||
|
if($(this).css('position') === 'fixed') {
|
||||||
|
position = 'fixed';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.$el.css({ position: position }); // Update positioning
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3,15 +3,18 @@
|
|||||||
*
|
*
|
||||||
* require jQuery, jquery.textcomplete
|
* require jQuery, jquery.textcomplete
|
||||||
*/
|
*/
|
||||||
function contact_search(term, callback, backend_url, type, extra_channels) {
|
function contact_search(term, callback, backend_url, type, extra_channels, spinelement) {
|
||||||
|
if(spinelement){
|
||||||
|
$(spinelement).spin('tiny');
|
||||||
|
}
|
||||||
// Check if there is a cached result that contains the same information we would get with a full server-side search
|
// Check if there is a cached result that contains the same information we would get with a full server-side search
|
||||||
|
|
||||||
var bt = backend_url+type;
|
var bt = backend_url+type;
|
||||||
if(!(bt in contact_search.cache)) contact_search.cache[bt] = {};
|
if(!(bt in contact_search.cache)) contact_search.cache[bt] = {};
|
||||||
|
|
||||||
var lterm = term.toLowerCase(); // Ignore case
|
var lterm = term.toLowerCase(); // Ignore case
|
||||||
for(t in contact_search.cache[bt]) {
|
for(t in contact_search.cache[bt]) {
|
||||||
if(lterm.indexOf(t) >= 0) { // A more broad search has been performed already, so use those results
|
if(lterm.indexOf(t) >= 0) { // A more broad search has been performed already, so use those results
|
||||||
|
$(spinelement).spin(false);
|
||||||
// Filter old results locally
|
// Filter old results locally
|
||||||
var matching = contact_search.cache[bt][t].filter(function (x) { return (x.name.toLowerCase().indexOf(lterm) >= 0 || (typeof x.nick !== 'undefined' && x.nick.toLowerCase().indexOf(lterm) >= 0)); }); // Need to check that nick exists because groups don't have one
|
var matching = contact_search.cache[bt][t].filter(function (x) { return (x.name.toLowerCase().indexOf(lterm) >= 0 || (typeof x.nick !== 'undefined' && x.nick.toLowerCase().indexOf(lterm) >= 0)); }); // Need to check that nick exists because groups don't have one
|
||||||
matching.unshift({taggable:false, text: term, replace: term});
|
matching.unshift({taggable:false, text: term, replace: term});
|
||||||
@ -44,6 +47,7 @@ function contact_search(term, callback, backend_url, type, extra_channels) {
|
|||||||
var items = data.items.slice(0);
|
var items = data.items.slice(0);
|
||||||
items.unshift({taggable:false, text: term, replace: term});
|
items.unshift({taggable:false, text: term, replace: term});
|
||||||
callback(items);
|
callback(items);
|
||||||
|
$(spinelement).spin(false);
|
||||||
},
|
},
|
||||||
}).fail(function () {callback([]); }); // Callback must be invoked even if something went wrong.
|
}).fail(function () {callback([]); }); // Callback must be invoked even if something went wrong.
|
||||||
}
|
}
|
||||||
@ -98,7 +102,7 @@ function submit_form(e) {
|
|||||||
contacts = {
|
contacts = {
|
||||||
match: /(^|\s)(@\!*)([^ \n]+)$/,
|
match: /(^|\s)(@\!*)([^ \n]+)$/,
|
||||||
index: 3,
|
index: 3,
|
||||||
search: function(term, callback) { contact_search(term, callback, backend_url, 'c', extra_channels); },
|
search: function(term, callback) { contact_search(term, callback, backend_url, 'c', extra_channels, spinelement=false); },
|
||||||
replace: editor_replace,
|
replace: editor_replace,
|
||||||
template: contact_format,
|
template: contact_format,
|
||||||
}
|
}
|
||||||
@ -125,7 +129,7 @@ function submit_form(e) {
|
|||||||
contacts = {
|
contacts = {
|
||||||
match: /(^@)([^\n]{2,})$/,
|
match: /(^@)([^\n]{2,})$/,
|
||||||
index: 2,
|
index: 2,
|
||||||
search: function(term, callback) { contact_search(term, callback, backend_url, 'x',[]); },
|
search: function(term, callback) { contact_search(term, callback, backend_url, 'x', [], spinelement='#nav-search-spinner'); },
|
||||||
replace: basic_replace,
|
replace: basic_replace,
|
||||||
template: contact_format,
|
template: contact_format,
|
||||||
}
|
}
|
||||||
@ -147,7 +151,7 @@ function submit_form(e) {
|
|||||||
contacts = {
|
contacts = {
|
||||||
match: /(^)([^\n]+)$/,
|
match: /(^)([^\n]+)$/,
|
||||||
index: 2,
|
index: 2,
|
||||||
search: function(term, callback) { contact_search(term, callback, backend_url, typ,[]); },
|
search: function(term, callback) { contact_search(term, callback, backend_url, typ,[], spinelement=false); },
|
||||||
replace: basic_replace,
|
replace: basic_replace,
|
||||||
template: contact_format,
|
template: contact_format,
|
||||||
}
|
}
|
||||||
|
@ -876,8 +876,8 @@ footer {
|
|||||||
|
|
||||||
nav .acpopup {
|
nav .acpopup {
|
||||||
top: 49px !important;
|
top: 49px !important;
|
||||||
right: 30px !important;
|
margin-left: -35px;
|
||||||
margin-left: -45px;
|
width: 290px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile-clear {
|
.profile-clear {
|
||||||
|
Reference in New Issue
Block a user