mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 08:53:37 +01:00
drop old select/taglist/link incl. Choosen and MagicSuggest
This commit is contained in:
parent
ad82ea8faf
commit
ce418affe8
@ -351,6 +351,11 @@ export class et2_arrayMgr
|
||||
|
||||
parseBoolExpression(_expression : string)
|
||||
{
|
||||
if (typeof _expression === "undefined" || _expression === null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check whether "$" occurs in the given identifier, don't parse rows if we're not in a row
|
||||
// This saves booleans in repeating rows from being parsed too early - we'll parse again when repeating
|
||||
if(_expression.indexOf('$') >= 0 && this.perspectiveData.row == null && _expression.match(/\$\{?row\}?/))
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -12,741 +12,13 @@
|
||||
* @copyright Nathan Gray 2012
|
||||
*/
|
||||
|
||||
/*egw:uses
|
||||
et2_widget_link;
|
||||
*/
|
||||
|
||||
import {et2_selectbox} from "./et2_widget_selectbox";
|
||||
import {et2_createWidget, et2_register_widget, et2_widget, WidgetConfig} from "./et2_core_widget";
|
||||
import {ClassWithAttributes} from "./et2_core_inheritance";
|
||||
import {et2_link_entry, et2_link_string} from "./et2_widget_link";
|
||||
import {et2_dialog} from "./et2_widget_dialog";
|
||||
import {egw} from "../jsapi/egw_global";
|
||||
import type {Et2SelectAccountReadonly} from "./Et2Select/Et2SelectReadonly";
|
||||
import type {Et2SelectAccount} from "./Et2Select/Et2SelectAccount";
|
||||
|
||||
/**
|
||||
* Account selection widget
|
||||
* Changes according to the user's account_selection preference
|
||||
* - 'none' => Server-side: the read-only widget is used, and no values are sent or displayed
|
||||
* - 'groupmembers' => Non admins can only select groupmembers (Server side - normal selectbox)
|
||||
* - 'selectbox' => Selectbox with all accounts and groups (Server side - normal selectbox)
|
||||
* - 'primary_group' => Selectbox with primary group and search
|
||||
*
|
||||
* Only primary_group and popup need anything different from a normal selectbox
|
||||
*
|
||||
* @deprecated use Et2SelectAccount
|
||||
*/
|
||||
export class et2_selectAccount extends et2_selectbox
|
||||
{
|
||||
static readonly _attributes : any = {
|
||||
'account_type': {
|
||||
'name': 'Account type',
|
||||
'default': 'accounts',
|
||||
'type': 'string',
|
||||
'description': 'Limit type of accounts. One of {accounts,groups,both,owngroups}.'
|
||||
}
|
||||
};
|
||||
|
||||
public static readonly legacyOptions = ['empty_label','account_type'];
|
||||
|
||||
public static readonly account_types = ['accounts','groups','both','owngroups'];
|
||||
private search: JQuery;
|
||||
private dialog: et2_dialog;
|
||||
private widgets: any;
|
||||
private search_widget: et2_link_entry;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
*/
|
||||
constructor(_parent : et2_widget, _attrs? : WidgetConfig, _child? : object)
|
||||
{
|
||||
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_selectAccount._attributes, _child || {}));
|
||||
|
||||
// Type in rows or somewhere else?
|
||||
if(et2_selectAccount.account_types.indexOf(this.options.empty_label) >= 0 && (
|
||||
et2_selectAccount.account_types.indexOf(this.options.account_type) < 0 ||
|
||||
this.options.account_type == et2_selectAccount._attributes.account_type.default)
|
||||
)
|
||||
{
|
||||
this.options.account_type = _attrs['empty_label'];
|
||||
this.options.empty_label = '';
|
||||
}
|
||||
if(jQuery.inArray(_attrs['account_type'], et2_selectAccount.account_types) < 0)
|
||||
{
|
||||
this.egw().debug("warn", "Invalid account_type: %s Valid options:",_attrs['account_type'], et2_selectAccount.account_types);
|
||||
}
|
||||
|
||||
// Holder for search jQuery nodes
|
||||
this.search = null;
|
||||
|
||||
// Reference to dialog
|
||||
this.dialog = null;
|
||||
|
||||
// Reference to widget within dialog
|
||||
this.widgets = null;
|
||||
|
||||
if(!this.options.empty_label && !this.options.readonly && this.options.multiple)
|
||||
{
|
||||
this.options.empty_label = this.egw().lang('Select user or group');
|
||||
}
|
||||
|
||||
// Allow certain widgets inside this one
|
||||
this.supportedWidgetClasses = [et2_link_entry];
|
||||
}
|
||||
|
||||
destroy( )
|
||||
{
|
||||
super.destroy.apply(this, arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* Single selection - override to add search button
|
||||
*/
|
||||
createInputWidget()
|
||||
{
|
||||
var type = this.egw().preference('account_selection', 'common');
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case 'none':
|
||||
if(typeof egw.user('apps').admin == 'undefined')
|
||||
{
|
||||
this.options.select_options = {};
|
||||
break;
|
||||
}
|
||||
case 'selectbox':
|
||||
case 'groupmembers':
|
||||
default:
|
||||
this.options.select_options = this._get_accounts();
|
||||
break;
|
||||
}
|
||||
|
||||
super.createInputWidget();
|
||||
|
||||
// Add search button
|
||||
if(type == 'primary_group')
|
||||
{
|
||||
var button = jQuery(document.createElement("span"))
|
||||
.addClass("et2_clickable")
|
||||
.click(this, jQuery.proxy(function(e) {
|
||||
// Auto-expand
|
||||
if(this.options.expand_multiple_rows && !this.options.multiple)
|
||||
{
|
||||
this.set_multiple(true, this.options.expand_multiple_rows);
|
||||
}
|
||||
|
||||
if(this.options.multiple)
|
||||
{
|
||||
this._open_multi_search(e);
|
||||
}
|
||||
else
|
||||
{
|
||||
this._open_search(e);
|
||||
}
|
||||
},this))
|
||||
.attr("title", egw.lang("popup with search"))
|
||||
.append('<span class="ui-icon ui-icon-search" style="display:inline-block"/>');
|
||||
|
||||
this.getSurroundings().insertDOMNode(button[0]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple selection - override to add search button
|
||||
*/
|
||||
createMultiSelect( )
|
||||
{
|
||||
|
||||
var type = this.egw().preference('account_selection', 'common');
|
||||
if(type == 'none' && typeof egw.user('apps').admin == 'undefined') return;
|
||||
|
||||
super.createMultiSelect();
|
||||
|
||||
this.options.select_options = this._get_accounts();
|
||||
|
||||
if(type == 'primary_group')
|
||||
{
|
||||
// Allow search 'inside' this widget
|
||||
this.supportedWidgetClasses = [et2_link_entry];
|
||||
|
||||
// Add quick search - turn off multiple to get normal result list
|
||||
this.options.multiple = false;
|
||||
this._create_search();
|
||||
|
||||
// Clear search box after select
|
||||
var old_select = this.search_widget.select;
|
||||
var self = this;
|
||||
// @ts-ignore
|
||||
this.search_widget.select = function(e, selected) {
|
||||
var current = <string[]>self.getValue();
|
||||
|
||||
// Fix ID as sent from server - must be numeric
|
||||
selected.item.value = parseInt(selected.item.value);
|
||||
|
||||
// This one is important, it makes sure the option is there
|
||||
old_select.apply(this, arguments);
|
||||
|
||||
// Add quick search selection into current selection
|
||||
current.push(selected.item.value);
|
||||
|
||||
// Clear search
|
||||
this.search.val('');
|
||||
|
||||
self.set_value(current);
|
||||
};
|
||||
|
||||
// Put search results as a DOM sibling of the options, for proper display
|
||||
this.search_widget.search.on("autocompleteopen", jQuery.proxy(function() {
|
||||
this.search_widget.search.data("ui-autocomplete").menu.element
|
||||
.appendTo(this.node)
|
||||
.position({my: 'left top', at: 'left bottom', of: this.multiOptions.prev()});
|
||||
},this));
|
||||
this.search = jQuery(document.createElement("li"))
|
||||
.appendTo(this.multiOptions.prev().find('ul'));
|
||||
this.options.multiple = true;
|
||||
|
||||
// Add search button
|
||||
var button = jQuery(document.createElement("li"))
|
||||
.addClass("et2_clickable")
|
||||
.click(this, this._open_multi_search)
|
||||
.attr("title", egw.lang("popup with search"))
|
||||
.append('<span class="ui-icon ui-icon-search"/>');
|
||||
var type = this.egw().preference('account_selection', 'common');
|
||||
|
||||
// Put it last so check/uncheck doesn't move around
|
||||
this.multiOptions.prev().find('ul')
|
||||
.append(button);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Override parent to make sure accounts are there as options.
|
||||
*
|
||||
* Depending on the widget's attributes and the user's preferences, not all selected
|
||||
* accounts may be in the cache as options, so we fetch the extras to make sure
|
||||
* we don't lose any.
|
||||
*
|
||||
* As fetching them might only work asynchron (if they are not yet loaded),
|
||||
* we have to call set_value again, once all labels have arrived from server.
|
||||
*
|
||||
* @param {string|array} _value
|
||||
*/
|
||||
set_value(_value)
|
||||
{
|
||||
if(typeof _value == "string" && this.options.multiple && _value.match(this._is_multiple_regexp) !== null)
|
||||
{
|
||||
_value = _value.split(',');
|
||||
}
|
||||
|
||||
if(_value)
|
||||
{
|
||||
var search = _value;
|
||||
if (!jQuery.isArray(search))
|
||||
{
|
||||
search = [_value];
|
||||
}
|
||||
var update_options = false;
|
||||
var num_calls = 0;
|
||||
var current_call = 0;
|
||||
for(var j = 0; j < search.length; j++)
|
||||
{
|
||||
var found = false;
|
||||
|
||||
// Not having a value to look up causes an infinite loop
|
||||
if(!search[j] || search[j] === "0") continue;
|
||||
|
||||
// Options are not indexed, so we must look
|
||||
for(var i = 0; !found && i < this.options.select_options.length; i++)
|
||||
{
|
||||
if (typeof this.options.select_options[i] != 'object')
|
||||
{
|
||||
egw.debug('warn',this.id + ' wrong option '+i+' this.options.select_options=', this.options.select_options);
|
||||
continue;
|
||||
}
|
||||
if(this.options.select_options[i].value == search[j]) found = true;
|
||||
}
|
||||
// We only look for numeric IDs, non-numeric IDs cause an exception
|
||||
if(!found && !isNaN(search[j]))
|
||||
{
|
||||
// Add it in
|
||||
var name = this.egw().link_title('api-accounts', search[j], false);
|
||||
if (name) // was already cached on client-side
|
||||
{
|
||||
update_options = true;
|
||||
this.options.select_options.push({value: search[j], label:name});
|
||||
}
|
||||
else // not available: need to call set_value again, after all arrived from server
|
||||
{
|
||||
++num_calls;
|
||||
// Add immediately with value as label, we'll replace later
|
||||
this._appendOptionElement(search[j],search[j]);
|
||||
this.egw().link_title('api-accounts', search[j], function(name)
|
||||
{
|
||||
if (++current_call >= num_calls) // only run last callback
|
||||
{
|
||||
// Update the label
|
||||
// Options are not indexed, so we must look
|
||||
for(var i = 0; i < this.widget.options.select_options.length; i++)
|
||||
{
|
||||
var opt = this.widget.options.select_options[i];
|
||||
if(opt && opt.value && opt.value == this.unknown && opt.label == this.unknown)
|
||||
{
|
||||
opt.label = name;
|
||||
this.widget.set_select_options(this.widget.options.select_options);
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.widget.set_value(_value);
|
||||
}
|
||||
}, {widget: this, unknown: search[j]});
|
||||
}
|
||||
}
|
||||
}
|
||||
if(update_options)
|
||||
{
|
||||
this.set_select_options(this.options.select_options);
|
||||
}
|
||||
}
|
||||
super.set_value(_value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get account info for select options from common client-side account cache
|
||||
*
|
||||
* @return {Array} select options
|
||||
*/
|
||||
_get_accounts()
|
||||
{
|
||||
if (!jQuery.isArray(this.options.select_options))
|
||||
{
|
||||
var options = jQuery.extend({}, this.options.select_options);
|
||||
this.options.select_options = [];
|
||||
for(var key in options)
|
||||
{
|
||||
if (typeof options[key] == 'object')
|
||||
{
|
||||
if (typeof(options[key].key) == 'undefined')
|
||||
{
|
||||
options[key].value = key;
|
||||
}
|
||||
this.options.select_options.push(options[key]);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.options.select_options.push({value: key, label: options[key]});
|
||||
}
|
||||
}
|
||||
}
|
||||
var type = this.egw().preference('account_selection', 'common');
|
||||
var accounts = [];
|
||||
// for primary_group we only display owngroups == own memberships, not other groups
|
||||
if (type == 'primary_group' && this.options.account_type != 'accounts')
|
||||
{
|
||||
if (this.options.account_type == 'both')
|
||||
{
|
||||
accounts = this.egw().accounts('accounts');
|
||||
}
|
||||
accounts = accounts.concat(this.egw().accounts('owngroups'));
|
||||
}
|
||||
else
|
||||
{
|
||||
accounts = this.egw().accounts(this.options.account_type);
|
||||
}
|
||||
return this.options.select_options.concat(accounts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create & display a way to search & select a single account / group
|
||||
* Single selection is just link widget
|
||||
*
|
||||
* @param e event
|
||||
*/
|
||||
_open_search( e)
|
||||
{
|
||||
var widget = e.data;
|
||||
var search = widget._create_search();
|
||||
|
||||
// Selecting a single user closes the dialog, this only used if user cleared
|
||||
var ok_click = function() {
|
||||
widget.set_value([]);
|
||||
// Fire change event
|
||||
if(widget.input) widget.input.trigger("change");
|
||||
jQuery(this).dialog("close");
|
||||
};
|
||||
widget._create_dialog(search, ok_click);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create & display a way to search & select multiple accounts / groups
|
||||
*
|
||||
* @param e event
|
||||
*/
|
||||
_open_multi_search( e)
|
||||
{
|
||||
var widget = e && e.data ? e.data : this;
|
||||
var table = widget.search = jQuery('<table><tbody><tr valign="top"><td id="search_col"/><td id="selection_col"/></tr></tbody></table>');
|
||||
table.css("width", "100%").css("height", "100%");
|
||||
var search_col = jQuery('#search_col',table);
|
||||
var select_col = jQuery('#selection_col',table);
|
||||
|
||||
// Search / Selection
|
||||
search_col.append(widget._create_search());
|
||||
|
||||
// Currently selected
|
||||
select_col.append(widget._create_selected());
|
||||
|
||||
var ok_click = function() {
|
||||
jQuery(this).dialog("close");
|
||||
// Update widget with selected
|
||||
var ids = [];
|
||||
var data = {};
|
||||
jQuery('#'+widget.getInstanceManager().uniqueId + '_selected li',select_col).each(function() {
|
||||
var id = jQuery(this).attr("data-id");
|
||||
// Add to list
|
||||
ids.push(id);
|
||||
|
||||
// Make sure option is there
|
||||
if(widget.options.multiple && jQuery('input[id$="_opt_'+id+'"]',widget.multiOptions).length == 0)
|
||||
{
|
||||
widget._appendMultiOption(id,jQuery('label',this).text());
|
||||
}
|
||||
else if (!widget.options.multiple && jQuery('option[value="'+id+'"]',widget.node).length == 0)
|
||||
{
|
||||
widget._appendOptionElement(id,jQuery('label',this).text());
|
||||
}
|
||||
});
|
||||
|
||||
widget.set_value(ids);
|
||||
|
||||
// Fire change event
|
||||
if(widget.input) widget.input.trigger("change");
|
||||
};
|
||||
|
||||
var container = jQuery(document.createElement("div")).append(table);
|
||||
return widget._create_dialog(container, ok_click);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create / display popup with search / selection widgets
|
||||
*
|
||||
* @param {et2_dialog} widgets
|
||||
* @param {function} update_function
|
||||
*/
|
||||
_create_dialog( widgets, update_function)
|
||||
{
|
||||
this.widgets = widgets;
|
||||
this.dialog = et2_dialog.show_dialog(undefined,
|
||||
'',
|
||||
this.options.label ? this.options.label : this.egw().lang('Select'),
|
||||
{},
|
||||
[{
|
||||
text: this.egw().lang("ok"),
|
||||
image: 'check',
|
||||
click: update_function
|
||||
},{
|
||||
text: this.egw().lang("cancel"),
|
||||
image: 'cancel'
|
||||
}]
|
||||
);
|
||||
this.dialog.set_dialog_type('');
|
||||
// Static size for easier layout
|
||||
this.dialog.div.dialog({width: "500", height: "370"});
|
||||
|
||||
this.dialog.div.append(widgets.width('100%'));
|
||||
return widgets;
|
||||
}
|
||||
|
||||
/**
|
||||
* Search is a link-entry widget, with some special display for multi-select
|
||||
*/
|
||||
_create_search( )
|
||||
{
|
||||
var self = this;
|
||||
var search = this.search = jQuery(document.createElement("div"));
|
||||
|
||||
var search_widget = this.search_widget = <et2_link_entry>et2_createWidget('link-entry', {
|
||||
'only_app': 'api-accounts',
|
||||
'query'( request, response)
|
||||
{
|
||||
// Clear previous search results for multi-select
|
||||
if(!request.options)
|
||||
{
|
||||
search.find('#search_results').empty();
|
||||
}
|
||||
// Restrict to specified account type
|
||||
if(!request.options || !request.options.filter)
|
||||
{
|
||||
request.options = {account_type: self.options.account_type};
|
||||
}
|
||||
return true;
|
||||
},
|
||||
'select'( e, selected)
|
||||
{
|
||||
// Make sure option is there
|
||||
var already_there = false;
|
||||
var last_key = null;
|
||||
for(last_key in self.options.select_options)
|
||||
{
|
||||
var option = self.options.select_options[last_key];
|
||||
already_there = already_there || (typeof option.value != 'undefined' && option.value == selected.item.value);
|
||||
}
|
||||
if(!already_there)
|
||||
{
|
||||
self.options.select_options[parseInt(last_key)+1] = selected.item;
|
||||
self._appendOptionElement(selected.item.value, selected.item.label);
|
||||
}
|
||||
self.set_value(selected.item.value);
|
||||
if(self.dialog && self.dialog.div)
|
||||
{
|
||||
self.dialog.div.dialog("close");
|
||||
}
|
||||
// Fire change event
|
||||
if(self.input) self.input.trigger("change");
|
||||
return true;
|
||||
}
|
||||
}, this);
|
||||
// add it where we want it
|
||||
search.append(search_widget.getDOMNode());
|
||||
|
||||
if(!this.options.multiple) return search;
|
||||
|
||||
// Multiple is more complicated. It uses a custom display for results to
|
||||
// allow choosing multiples from a match
|
||||
var results = jQuery(document.createElement("ul"))
|
||||
.attr("id", "search_results")
|
||||
.css("height", "230px")
|
||||
.addClass("ui-multiselect-checkboxes ui-helper-reset");
|
||||
jQuery(document.createElement("div"))
|
||||
.addClass("et2_selectbox")
|
||||
.css("height", "100%")
|
||||
.append(results)
|
||||
.appendTo(search);
|
||||
|
||||
// Override link-entry auto-complete for custom display
|
||||
// Don't show normal drop-down
|
||||
search_widget.search.data("ui-autocomplete")._suggest = function(items) {
|
||||
jQuery.each(items, function (index, item) {
|
||||
// Make sure value is numeric
|
||||
item.value = parseInt(item.value);
|
||||
self._add_search_result(results, item);
|
||||
});
|
||||
};
|
||||
|
||||
return search;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the selected result to the list of search results
|
||||
*
|
||||
* @param list
|
||||
* @param item
|
||||
*/
|
||||
_add_search_result( list, item)
|
||||
{
|
||||
|
||||
var node = null;
|
||||
var self = this;
|
||||
|
||||
// Make sure value is numeric
|
||||
if(item.value) item.value = parseInt(item.value);
|
||||
|
||||
// (containter of) Currently selected users / groups
|
||||
var selected = jQuery('#'+this.getInstanceManager().uniqueId + "_selected", this.widgets);
|
||||
|
||||
// Group
|
||||
if(item.value && item.value < 0)
|
||||
{
|
||||
node = jQuery(document.createElement('ul'));
|
||||
// Add button to show users
|
||||
if(this.options.account_type != 'groups')
|
||||
{
|
||||
jQuery('<span class="ui-icon ui-icon-circlesmall-plus et2_clickable"/>')
|
||||
.css("float", "left")
|
||||
.appendTo(node)
|
||||
.click(function() {
|
||||
if(jQuery(this).hasClass("ui-icon-circlesmall-plus"))
|
||||
{
|
||||
jQuery(this).removeClass("ui-icon-circlesmall-plus")
|
||||
.addClass("ui-icon-circlesmall-minus");
|
||||
|
||||
var group = jQuery(this).parent()
|
||||
.addClass("expanded");
|
||||
|
||||
if(group.children("li").length == 0)
|
||||
{
|
||||
// Fetch group members
|
||||
self.search_widget.query({
|
||||
term:"",
|
||||
options: {filter:{group: item.value}},
|
||||
no_cache:true
|
||||
}, function(items) {
|
||||
jQuery(items).each(function(index,item) {
|
||||
self._add_search_result(node, item);
|
||||
});
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
group.children("li")
|
||||
// Only show children that are not selected
|
||||
.each(function(index, item) {
|
||||
var j = jQuery(item);
|
||||
if(jQuery('[data-id="'+j.attr("data-id")+'"]',selected).length == 0)
|
||||
{
|
||||
j.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery(this).addClass("ui-icon-circlesmall-plus")
|
||||
.removeClass("ui-icon-circlesmall-minus");
|
||||
|
||||
var group = jQuery(this).parent().children("li").hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
// User
|
||||
else if (item.value)
|
||||
{
|
||||
node = jQuery(document.createElement('li'));
|
||||
}
|
||||
node.attr("data-id", item.value);
|
||||
|
||||
jQuery('<span class="ui-icon ui-icon-arrow-1-e et2_clickable"/>')
|
||||
.css("float", "right")
|
||||
.appendTo(node)
|
||||
.click(function() {
|
||||
var button = jQuery(this);
|
||||
self._add_selected(selected, button.parent().attr("data-id"));
|
||||
// Hide user, but only hide button for group
|
||||
if(button.parent().is('li'))
|
||||
{
|
||||
button.parent().hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
button.hide();
|
||||
}
|
||||
});
|
||||
|
||||
// If already in list, hide it
|
||||
if(jQuery('[data-id="'+item.value+'"]',selected).length != 0)
|
||||
{
|
||||
node.hide();
|
||||
}
|
||||
|
||||
var label = jQuery(document.createElement('label'))
|
||||
.addClass("loading")
|
||||
.appendTo(node);
|
||||
|
||||
this.egw().link_title('api-accounts', item.value, function(name) {
|
||||
label.text(name).removeClass("loading");
|
||||
}, label);
|
||||
|
||||
node.appendTo(list);
|
||||
}
|
||||
|
||||
_create_selected( )
|
||||
{
|
||||
var node = jQuery(document.createElement("div"))
|
||||
.addClass("et2_selectbox");
|
||||
|
||||
var header = jQuery(document.createElement("div"))
|
||||
.addClass("ui-widget-header ui-helper-clearfix")
|
||||
.appendTo(node);
|
||||
|
||||
var selected = jQuery(document.createElement("ul"))
|
||||
.addClass("ui-multiselect-checkboxes ui-helper-reset")
|
||||
.attr("id", this.getInstanceManager().uniqueId + "_selected")
|
||||
.css("height", "230px")
|
||||
.appendTo(node);
|
||||
|
||||
jQuery(document.createElement("span"))
|
||||
.text(this.egw().lang("Selection"))
|
||||
.addClass("ui-multiselect-header")
|
||||
.appendTo(header);
|
||||
|
||||
var controls = jQuery(document.createElement("ul"))
|
||||
.addClass('ui-helper-reset')
|
||||
.appendTo(header);
|
||||
|
||||
jQuery(document.createElement("li"))
|
||||
.addClass("et2_clickable")
|
||||
.click(selected, function(e) {jQuery("li",e.data).remove();})
|
||||
.append('<span class="ui-icon ui-icon-closethick"/>')
|
||||
.appendTo(controls);
|
||||
|
||||
// Add in currently selected
|
||||
if(this.getValue())
|
||||
{
|
||||
var value = this.getValue();
|
||||
for(var i = 0; i < value.length; i++) {
|
||||
this._add_selected(selected, value[i]);
|
||||
}
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an option to the list of selected accounts
|
||||
* value is the account / group ID
|
||||
*
|
||||
* @param list
|
||||
* @param value
|
||||
*/
|
||||
_add_selected( list, value)
|
||||
{
|
||||
|
||||
// Each option only once
|
||||
var there = jQuery('[data-id="' + value + '"]',list);
|
||||
if(there.length)
|
||||
{
|
||||
there.show();
|
||||
return;
|
||||
}
|
||||
|
||||
var option = jQuery(document.createElement('li'))
|
||||
.attr("data-id",value)
|
||||
.appendTo(list);
|
||||
jQuery('<div class="ui-icon ui-icon-close et2_clickable"/>')
|
||||
.css("float", "right")
|
||||
.appendTo(option)
|
||||
.click(function() {
|
||||
var id = jQuery(this).parent().attr("data-id");
|
||||
jQuery(this).parent().remove();
|
||||
// Add 'add' button back, if in results list
|
||||
list.parents("tr").find("[data-id='"+id+"']").show()
|
||||
// Show button(s) for group
|
||||
.children('span').show();
|
||||
});
|
||||
|
||||
var label = jQuery(document.createElement('label'))
|
||||
.addClass("loading")
|
||||
.appendTo(option);
|
||||
this.egw().link_title('api-accounts', value, function(name) {this.text(name).removeClass("loading");}, label);
|
||||
}
|
||||
|
||||
/**
|
||||
* Overwritten attachToDOM method to modify attachToDOM
|
||||
*/
|
||||
attachToDOM()
|
||||
{
|
||||
let result = super.attachToDOM();
|
||||
//Chosen needs to be set after widget dettached from DOM (eg. validation_error), because chosen is not part of the widget node
|
||||
if (this.egw().preference('account_selection', 'common') == 'primary_group')
|
||||
{
|
||||
jQuery(this.node).removeClass('chzn-done');
|
||||
this.set_tags(this.options.tags, this.options.width);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
et2_register_widget(et2_selectAccount, ["select-account"]);
|
||||
export type et2_selectAccount = Et2SelectAccount;
|
||||
|
||||
/**
|
||||
* @deprecated use Et2SelectAccountReadonly
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,24 +0,0 @@
|
||||
# Chosen, a Select Box Enhancer for jQuery and Protoype
|
||||
## by Patrick Filler for [Harvest](http://getharvest.com)
|
||||
|
||||
Available for use under the [MIT License](http://en.wikipedia.org/wiki/MIT_License)
|
||||
|
||||
Copyright (c) 2011 by Harvest
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
@ -1,50 +0,0 @@
|
||||
# Chosen
|
||||
|
||||
Chosen is a library for making long, unwieldy select boxes more user friendly.
|
||||
|
||||
- jQuery support: 1.4+
|
||||
- Prototype support: 1.7+
|
||||
|
||||
For documentation, usage, and examples, see:
|
||||
http://harvesthq.github.com/chosen
|
||||
|
||||
### Contributing to Chosen
|
||||
|
||||
Contributions and pull requests are very welcome. Please follow these guidelines when submitting new code.
|
||||
|
||||
1. Make all changes in Coffeescript files, **not** JavaScript files.
|
||||
2. For feature changes, update both jQuery *and* Prototype versions
|
||||
3. Use `npm install -d` to install the correct development dependencies.
|
||||
4. Use `cake build` or `cake watch` to generate Chosen's JavaScript file and minified version.
|
||||
5. Don't touch the `VERSION` file
|
||||
6. Submit a Pull Request using GitHub.
|
||||
|
||||
### Using CoffeeScript & Cake
|
||||
|
||||
First, make sure you have the proper CoffeeScript / Cake set-up in place. We have added a package.json that makes this easy:
|
||||
|
||||
```
|
||||
npm install -d
|
||||
```
|
||||
|
||||
This will install `coffee-script` and `uglifyjs`.
|
||||
|
||||
Once you're configured, building the JavasScript from the command line is easy:
|
||||
|
||||
cake build # build Chosen from source
|
||||
cake watch # watch coffee/ for changes and build Chosen
|
||||
|
||||
If you're interested, you can find the recipes in Cakefile.
|
||||
|
||||
|
||||
### Chosen Credits
|
||||
|
||||
- Built by [Harvest](http://www.getharvest.com/). Want to work on projects like this? [We’re hiring](http://www.getharvest.com/careers)!
|
||||
- Concept and development by [Patrick Filler](http://www.patrickfiller.com/)
|
||||
- Design and CSS by [Matthew Lettini](http://matthewlettini.com/)
|
||||
|
||||
### Notable Forks
|
||||
|
||||
- [Chosen for MooTools](https://github.com/julesjanssen/chosen), by Jules Janssen
|
||||
- [Chosen Drupal 7 Module](http://drupal.org/project/chosen), by Pol Dell'Aiera, Arshad Chummun, Bart Feenstra, Kálmán Hosszu, etc.
|
||||
- [Chosen CakePHP Plugin](https://github.com/paulredmond/chosen-cakephp), by Paul Redmond
|
Binary file not shown.
Before Width: | Height: | Size: 646 B |
Binary file not shown.
Before Width: | Height: | Size: 872 B |
@ -1,464 +0,0 @@
|
||||
/* @group Base */
|
||||
.chzn-container {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: 13px;
|
||||
zoom: 1;
|
||||
*display: inline;
|
||||
}
|
||||
.chzn-container .chzn-drop {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: -9999px;
|
||||
z-index: 1010;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
border: 1px solid #aaa;
|
||||
border-top: 0;
|
||||
background: #fff;
|
||||
box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
.chzn-container.chzn-with-drop .chzn-drop {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
/* @group Single Chosen */
|
||||
.chzn-container-single .chzn-single {
|
||||
position: relative;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
padding: 0 0 0 8px;
|
||||
height: 23px;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 5px;
|
||||
background-color: #fff;
|
||||
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
|
||||
background: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
background: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
background: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
background: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
background-clip: padding-box;
|
||||
box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||
color: #444;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
line-height: 24px;
|
||||
}
|
||||
.chzn-container-single .chzn-default {
|
||||
color: #999;
|
||||
}
|
||||
.chzn-container-single .chzn-single span {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
margin-right: 26px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
padding-top: 4px;
|
||||
}
|
||||
.chzn-container-single .chzn-single-with-deselect span {
|
||||
margin-right: 38px;
|
||||
}
|
||||
.chzn-container-single .chzn-single abbr {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 26px;
|
||||
display: block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: url('chosen-sprite.png') -42px 1px no-repeat;
|
||||
font-size: 1px;
|
||||
}
|
||||
.chzn-container-single .chzn-single abbr:hover {
|
||||
background-position: -42px -10px;
|
||||
}
|
||||
.chzn-container-single.chzn-disabled .chzn-single abbr:hover {
|
||||
background-position: -42px -10px;
|
||||
}
|
||||
.chzn-container-single .chzn-single div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
display: block;
|
||||
width: 18px;
|
||||
height: 100%;
|
||||
}
|
||||
.chzn-container-single .chzn-single div b {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url('chosen-sprite.png') no-repeat 0px 4px;
|
||||
}
|
||||
.chzn-container-single .chzn-search {
|
||||
position: relative;
|
||||
z-index: 1010;
|
||||
margin: 0;
|
||||
padding: 3px 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.chzn-container-single .chzn-search input {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin: 1px 0;
|
||||
padding: 4px 20px 4px 5px;
|
||||
width: 100%;
|
||||
outline: 0;
|
||||
border: 1px solid #aaa;
|
||||
background: white url('chosen-sprite.png') no-repeat 100% -20px;
|
||||
background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
||||
background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat 100% -20px, -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat 100% -20px, -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat 100% -20px, linear-gradient(#eeeeee 1%, #ffffff 15%);
|
||||
font-size: 1em;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
.chzn-container-single .chzn-drop {
|
||||
margin-top: -1px;
|
||||
border-radius: 0 0 4px 4px;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
.chzn-container-single.chzn-container-single-nosearch .chzn-search {
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
/* @group Results */
|
||||
.chzn-container .chzn-results {
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
margin: 0 4px 4px 0;
|
||||
padding: 0 0 0 4px;
|
||||
max-height: 240px;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.chzn-container .chzn-results li {
|
||||
display: none;
|
||||
margin: 0;
|
||||
padding: 5px 6px;
|
||||
list-style: none;
|
||||
line-height: 15px;
|
||||
}
|
||||
.chzn-container .chzn-results li.active-result {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
.chzn-container .chzn-results li.disabled-result {
|
||||
display: list-item;
|
||||
color: #ccc;
|
||||
cursor: default;
|
||||
}
|
||||
.chzn-container .chzn-results li.highlighted {
|
||||
background-color: #3875d7;
|
||||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
|
||||
background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%);
|
||||
background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%);
|
||||
background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%);
|
||||
background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
|
||||
color: #fff;
|
||||
}
|
||||
.chzn-container .chzn-results li.no-results {
|
||||
display: list-item;
|
||||
background: #f4f4f4;
|
||||
}
|
||||
.chzn-container .chzn-results li.group-result {
|
||||
display: list-item;
|
||||
color: #999;
|
||||
font-weight: bold;
|
||||
cursor: default;
|
||||
}
|
||||
.chzn-container .chzn-results li.group-option {
|
||||
padding-left: 15px;
|
||||
}
|
||||
.chzn-container .chzn-results li em {
|
||||
font-style: normal;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
/* @group Multi Chosen */
|
||||
.chzn-container-multi .chzn-choices {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: auto !important;
|
||||
height: 1%;
|
||||
border: 1px solid #aaa;
|
||||
background-color: #fff;
|
||||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
||||
background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
|
||||
background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
|
||||
background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
|
||||
background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
|
||||
cursor: text;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices li {
|
||||
float: left;
|
||||
list-style: none;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices li.search-field {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices li.search-field input {
|
||||
margin: 1px 0;
|
||||
padding: 5px;
|
||||
height: 15px;
|
||||
outline: 0;
|
||||
border: 0 !important;
|
||||
background: transparent !important;
|
||||
box-shadow: none;
|
||||
color: #666;
|
||||
font-size: 100%;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices li.search-field .default {
|
||||
color: #999;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices li.search-choice {
|
||||
position: relative;
|
||||
margin: 3px 0 3px 5px;
|
||||
padding: 3px 20px 3px 5px;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 3px;
|
||||
background-color: #e4e4e4;
|
||||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
|
||||
background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-clip: padding-box;
|
||||
box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
|
||||
color: #333;
|
||||
line-height: 13px;
|
||||
cursor: default;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices li.search-choice .search-choice-close {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 3px;
|
||||
display: block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: url('chosen-sprite.png') -42px 1px no-repeat;
|
||||
font-size: 1px;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices li.search-choice .search-choice-close:hover {
|
||||
background-position: -42px -10px;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices li.search-choice-disabled {
|
||||
padding-right: 5px;
|
||||
border: 1px solid #ccc;
|
||||
background-color: #e4e4e4;
|
||||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
|
||||
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
color: #666;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices li.search-choice-focus {
|
||||
background: #d4d4d4;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices li.search-choice-focus .search-choice-close {
|
||||
background-position: -42px -10px;
|
||||
}
|
||||
.chzn-container-multi .chzn-results {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.chzn-container-multi .chzn-drop .result-selected {
|
||||
display: list-item;
|
||||
color: #ccc;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
/* @group Active */
|
||||
.chzn-container-active .chzn-single {
|
||||
border: 1px solid #5897fb;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.chzn-container-active.chzn-with-drop .chzn-single {
|
||||
border: 1px solid #aaa;
|
||||
-moz-border-radius-bottomright: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
-moz-border-radius-bottomleft: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
|
||||
background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%);
|
||||
background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%);
|
||||
background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%);
|
||||
background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
|
||||
box-shadow: 0 1px 0 #fff inset;
|
||||
}
|
||||
.chzn-container-active.chzn-with-drop .chzn-single div {
|
||||
border-left: none;
|
||||
background: transparent;
|
||||
}
|
||||
.chzn-container-active.chzn-with-drop .chzn-single div b {
|
||||
background-position: -18px 2px;
|
||||
}
|
||||
.chzn-container-active .chzn-choices {
|
||||
border: 1px solid #5897fb;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.chzn-container-active .chzn-choices li.search-field input {
|
||||
color: #111 !important;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
/* @group Disabled Support */
|
||||
.chzn-disabled {
|
||||
opacity: 0.5 !important;
|
||||
cursor: default;
|
||||
}
|
||||
.chzn-disabled .chzn-single {
|
||||
cursor: default;
|
||||
}
|
||||
.chzn-disabled .chzn-choices .search-choice .search-choice-close {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
/* @group Right to Left */
|
||||
.chzn-rtl {
|
||||
text-align: right;
|
||||
}
|
||||
.chzn-rtl .chzn-single {
|
||||
overflow: visible;
|
||||
padding: 0 8px 0 0;
|
||||
}
|
||||
.chzn-rtl .chzn-single span {
|
||||
margin-right: 0;
|
||||
margin-left: 26px;
|
||||
direction: rtl;
|
||||
}
|
||||
.chzn-rtl .chzn-single-with-deselect span {
|
||||
margin-left: 38px;
|
||||
}
|
||||
.chzn-rtl .chzn-single div {
|
||||
right: auto;
|
||||
left: 3px;
|
||||
}
|
||||
.chzn-rtl .chzn-single abbr {
|
||||
right: auto;
|
||||
left: 26px;
|
||||
}
|
||||
.chzn-rtl .chzn-choices li {
|
||||
float: right;
|
||||
}
|
||||
.chzn-rtl .chzn-choices li.search-field input {
|
||||
direction: rtl;
|
||||
}
|
||||
.chzn-rtl .chzn-choices li.search-choice {
|
||||
margin: 3px 5px 3px 0;
|
||||
padding: 3px 5px 3px 19px;
|
||||
}
|
||||
.chzn-rtl .chzn-choices li.search-choice .search-choice-close {
|
||||
right: auto;
|
||||
left: 4px;
|
||||
}
|
||||
.chzn-rtl.chzn-container-single-nosearch .chzn-search,
|
||||
.chzn-rtl .chzn-drop {
|
||||
left: 9999px;
|
||||
}
|
||||
.chzn-rtl.chzn-container-single .chzn-results {
|
||||
margin: 0 0 4px 4px;
|
||||
padding: 0 4px 0 0;
|
||||
}
|
||||
.chzn-rtl .chzn-results li.group-option {
|
||||
padding-right: 15px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.chzn-rtl.chzn-container-active.chzn-with-drop .chzn-single div {
|
||||
border-right: none;
|
||||
}
|
||||
.chzn-rtl .chzn-search input {
|
||||
padding: 4px 5px 4px 20px;
|
||||
background: white url('chosen-sprite.png') no-repeat -30px -20px;
|
||||
background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
||||
background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat -30px -20px, -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat -30px -20px, -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
|
||||
background: url('chosen-sprite.png') no-repeat -30px -20px, linear-gradient(#eeeeee 1%, #ffffff 15%);
|
||||
direction: rtl;
|
||||
}
|
||||
.chzn-rtl.chzn-container-single .chzn-single div b {
|
||||
background-position: 6px 2px;
|
||||
}
|
||||
.chzn-rtl.chzn-container-single.chzn-with-drop .chzn-single div b {
|
||||
background-position: -12px 2px;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
/* @group Retina compatibility */
|
||||
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) {
|
||||
.chzn-rtl .chzn-search input,
|
||||
.chzn-container-single .chzn-single abbr,
|
||||
.chzn-container-single .chzn-single div b,
|
||||
.chzn-container-single .chzn-search input,
|
||||
.chzn-container-multi .chzn-choices .search-choice .search-choice-close,
|
||||
.chzn-container .chzn-results-scroll-down span,
|
||||
.chzn-container .chzn-results-scroll-up span {
|
||||
background-image: url('chosen-sprite@2x.png') !important;
|
||||
background-size: 52px 37px !important;
|
||||
background-repeat: no-repeat !important;
|
||||
}
|
||||
}
|
||||
/* @end */
|
||||
|
||||
/**
|
||||
* Egw customizations for Chosen widget
|
||||
*/
|
||||
.chzn-container {
|
||||
display: inline-block;
|
||||
font-size: inherit;
|
||||
}
|
||||
.chzn-container .chzn-single {
|
||||
height: 19px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.chzn-container .chzn-results {
|
||||
padding: 0 0 0 0px;
|
||||
}
|
||||
.chzn-container .chzn-results li {
|
||||
line-height: 13px;
|
||||
padding: 3px 6px;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-field input {
|
||||
height: 12px;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-choice {
|
||||
line-height: 12px;
|
||||
margin: 2px 0 2px 1px;
|
||||
}
|
||||
.chzn-container .chzn-drop {
|
||||
border-top-width: 0px;
|
||||
}
|
||||
.chzn-container-active.chzn-with-drop.chzn-above .chzn-single {
|
||||
border-radius : 0px 0px 4px 4px;
|
||||
border-top-width: 0px;
|
||||
}
|
||||
|
||||
.chzn-container.chzn-above .chzn-drop {
|
||||
top:auto;
|
||||
bottom:23px;
|
||||
border-width:1px 1px 0px 1px;
|
||||
border-radius: 4px 4px 0px 0px;
|
||||
-webkit-box-shadow: 0 -4px 5px rgba(0,0,0,.15);
|
||||
-moz-box-shadow : 0 -4px 5px rgba(0,0,0,.15);
|
||||
box-shadow : 0 -4px 5px rgba(0,0,0,.15);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,18 +0,0 @@
|
||||
{
|
||||
"author": "harvest",
|
||||
"name": "chosen",
|
||||
"version": "0.9.8",
|
||||
"description": "Chosen is a JavaScript plugin that makes long, unwieldy select boxes much more user-friendly. It is currently available in both jQuery and Prototype flavors.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/harvesthq/chosen"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"coffee-script": ">= 1.2",
|
||||
"uglify-js": ">= 1.2.5"
|
||||
}
|
||||
}
|
@ -92,7 +92,6 @@
|
||||
"egroupware/idna": "^1.2.0",
|
||||
"egroupware/imap-client": "^2.31.0",
|
||||
"egroupware/listheaders": "^1.3.0",
|
||||
"egroupware/magicsuggest": "^2.1",
|
||||
"egroupware/mail": "^2.7.0",
|
||||
"egroupware/managesieve": "^1.1.0",
|
||||
"egroupware/mapi": "^1.1.0",
|
||||
|
145
composer.lock
generated
145
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "287615c1f7f9199293d09169d69023c7",
|
||||
"content-hash": "3f77b089cbf84c03eba959645196dcc2",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adldap2/adldap2",
|
||||
@ -379,110 +379,6 @@
|
||||
],
|
||||
"time": "2021-04-26T18:12:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "components/bootstrap",
|
||||
"version": "4.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/components/bootstrap.git",
|
||||
"reference": "6c183f17f5d8fbfb38af412c5e0a52135f7d01c9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/components/bootstrap/zipball/6c183f17f5d8fbfb38af412c5e0a52135f7d01c9",
|
||||
"reference": "6c183f17f5d8fbfb38af412c5e0a52135f7d01c9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"components/jquery": ">=2"
|
||||
},
|
||||
"type": "component",
|
||||
"extra": {
|
||||
"component": {
|
||||
"scripts": [
|
||||
"js/bootstrap.js"
|
||||
],
|
||||
"files": [
|
||||
"js/*.js",
|
||||
"css/*.css",
|
||||
"css/*.map"
|
||||
],
|
||||
"shim": {
|
||||
"deps": [
|
||||
"jquery"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jacob Thornton",
|
||||
"email": "jacobthornton@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Mark Otto",
|
||||
"email": "markdotto@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
|
||||
"homepage": "http://getbootstrap.com",
|
||||
"keywords": [
|
||||
"css",
|
||||
"framework",
|
||||
"front-end",
|
||||
"mobile-first",
|
||||
"responsive",
|
||||
"sass",
|
||||
"web"
|
||||
],
|
||||
"time": "2018-05-06T21:06:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "components/jquery",
|
||||
"version": "3.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/components/jquery.git",
|
||||
"reference": "459648cda77875519c5da3ae1dd0ed5d170aa649"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/components/jquery/zipball/459648cda77875519c5da3ae1dd0ed5d170aa649",
|
||||
"reference": "459648cda77875519c5da3ae1dd0ed5d170aa649",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "component",
|
||||
"extra": {
|
||||
"component": {
|
||||
"scripts": [
|
||||
"jquery.js"
|
||||
],
|
||||
"files": [
|
||||
"jquery.min.js",
|
||||
"jquery.min.map",
|
||||
"jquery.slim.js",
|
||||
"jquery.slim.min.js",
|
||||
"jquery.slim.min.map"
|
||||
]
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "JS Foundation and other contributors"
|
||||
}
|
||||
],
|
||||
"description": "jQuery JavaScript Library",
|
||||
"homepage": "http://jquery.com",
|
||||
"time": "2018-03-04T13:23:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/installers",
|
||||
"version": "v2.1.0",
|
||||
@ -1837,43 +1733,6 @@
|
||||
},
|
||||
"time": "2017-11-11T00:00:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "egroupware/magicsuggest",
|
||||
"version": "2.1.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/EGroupware/magicsuggest.git",
|
||||
"reference": "c9f571479c6b12772256ca8b63d67f5cb3f04e56"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/EGroupware/magicsuggest/zipball/c9f571479c6b12772256ca8b63d67f5cb3f04e56",
|
||||
"reference": "c9f571479c6b12772256ca8b63d67f5cb3f04e56",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"components/bootstrap": ">=3.0.0",
|
||||
"components/jquery": ">=1.8.3"
|
||||
},
|
||||
"type": "component",
|
||||
"extra": {
|
||||
"component": {
|
||||
"scripts": [
|
||||
"magicsuggest.js"
|
||||
],
|
||||
"files": [
|
||||
"magicsuggest.css"
|
||||
]
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"description": "Compiled version of magicsuggest customized for EGroupware project.",
|
||||
"homepage": "https://github.com/EGroupware/magicsuggest",
|
||||
"time": "2018-06-21T10:14:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "egroupware/mail",
|
||||
"version": "2.7.1",
|
||||
@ -12620,5 +12479,5 @@
|
||||
"platform-overrides": {
|
||||
"php": "7.3"
|
||||
},
|
||||
"plugin-api-version": "2.3.0"
|
||||
"plugin-api-version": "2.2.0"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user