mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-16 21:13:23 +01:00
remove addressbook-email from app-list in link widgets
This commit is contained in:
parent
3f9eae4940
commit
7d5ed49395
@ -85,7 +85,7 @@ var et2_link_to = et2_inputWidget.extend(
|
|||||||
|
|
||||||
this.link_button = null;
|
this.link_button = null;
|
||||||
this.status_span = null;
|
this.status_span = null;
|
||||||
|
|
||||||
this.link_entry = null;
|
this.link_entry = null;
|
||||||
this.file_upload = null;
|
this.file_upload = null;
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ var et2_link_to = et2_inputWidget.extend(
|
|||||||
destroy: function() {
|
destroy: function() {
|
||||||
this.link_button = null;
|
this.link_button = null;
|
||||||
this.status_span = null;
|
this.status_span = null;
|
||||||
|
|
||||||
this.link_entry.destroy();
|
this.link_entry.destroy();
|
||||||
this.link_entry = null;
|
this.link_entry = null;
|
||||||
this.file_upload.destroy();
|
this.file_upload.destroy();
|
||||||
@ -107,8 +107,8 @@ var et2_link_to = et2_inputWidget.extend(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Override to provide proper node for sub widgets to go in
|
* Override to provide proper node for sub widgets to go in
|
||||||
*
|
*
|
||||||
* @param {Object} _sender
|
* @param {Object} _sender
|
||||||
*/
|
*/
|
||||||
getDOMNode: function(_sender) {
|
getDOMNode: function(_sender) {
|
||||||
if(_sender == this) {
|
if(_sender == this) {
|
||||||
@ -256,8 +256,8 @@ var et2_link_to = et2_inputWidget.extend(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a link using the current internal values
|
* Create a link using the current internal values
|
||||||
*
|
*
|
||||||
* @param {Object} event
|
* @param {Object} event
|
||||||
*/
|
*/
|
||||||
createLink: function(event) {
|
createLink: function(event) {
|
||||||
// Disable link button
|
// Disable link button
|
||||||
@ -271,7 +271,7 @@ var et2_link_to = et2_inputWidget.extend(
|
|||||||
// Links to other entries
|
// Links to other entries
|
||||||
event.data = self.link_entry;
|
event.data = self.link_entry;
|
||||||
self.link_entry.createLink(event,links);
|
self.link_entry.createLink(event,links);
|
||||||
|
|
||||||
// Files
|
// Files
|
||||||
if(!self.options.no_files)
|
if(!self.options.no_files)
|
||||||
{
|
{
|
||||||
@ -304,7 +304,7 @@ var et2_link_to = et2_inputWidget.extend(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sent some links, server has a result
|
* Sent some links, server has a result
|
||||||
*
|
*
|
||||||
* @param {Object} success
|
* @param {Object} success
|
||||||
*/
|
*/
|
||||||
_link_result: function(success) {
|
_link_result: function(success) {
|
||||||
@ -457,7 +457,7 @@ var et2_link_apps = et2_selectbox.extend(
|
|||||||
// Register to update preference
|
// Register to update preference
|
||||||
var self = this;
|
var self = this;
|
||||||
this.input.bind("click",function() {
|
this.input.bind("click",function() {
|
||||||
if (typeof self.options.value != 'undefined') var appname = self.options.value.to_app;
|
if (typeof self.options.value != 'undefined') var appname = self.options.value.to_app;
|
||||||
egw.set_preference(appname || self.egw().getAppName(),'link_app',self.getValue());
|
egw.set_preference(appname || self.egw().getAppName(),'link_app',self.getValue());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -465,7 +465,7 @@ var et2_link_apps = et2_selectbox.extend(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* We get some minor speedups by overriding parent searching and directly setting select options
|
* We get some minor speedups by overriding parent searching and directly setting select options
|
||||||
*
|
*
|
||||||
* @param {Array} _attrs an array of attributes
|
* @param {Array} _attrs an array of attributes
|
||||||
*/
|
*/
|
||||||
transformAttributes: function(_attrs) {
|
transformAttributes: function(_attrs) {
|
||||||
@ -474,8 +474,11 @@ var et2_link_apps = et2_selectbox.extend(
|
|||||||
// Limit to one app
|
// Limit to one app
|
||||||
if(_attrs.only_app) {
|
if(_attrs.only_app) {
|
||||||
select_options[_attrs.only_app] = this.egw().lang(_attrs.only_app);
|
select_options[_attrs.only_app] = this.egw().lang(_attrs.only_app);
|
||||||
|
} else if (_attrs.application_list) {
|
||||||
|
select_options = _attrs.application_list;
|
||||||
} else {
|
} else {
|
||||||
select_options = _attrs.application_list ? _attrs.application_list : egw.link_app_list('query');
|
select_options = egw.link_app_list('query');
|
||||||
|
delete select_options['addressbook-email'];
|
||||||
}
|
}
|
||||||
_attrs.select_options = select_options;
|
_attrs.select_options = select_options;
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
@ -729,6 +732,7 @@ var et2_link_entry = et2_inputWidget.extend(
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
_attrs["select_options"] = this.egw().link_app_list('query');
|
_attrs["select_options"] = this.egw().link_app_list('query');
|
||||||
|
delete _attrs["select_options"]["addressbook-email"];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check whether the options entry was found, if not read it from the
|
// Check whether the options entry was found, if not read it from the
|
||||||
@ -880,9 +884,9 @@ var et2_link_entry = et2_inputWidget.extend(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Ask server for entries matching selected app/type and filtered by search string
|
* Ask server for entries matching selected app/type and filtered by search string
|
||||||
*
|
*
|
||||||
* @param {Object} request
|
* @param {Object} request
|
||||||
* @param {Object} response
|
* @param {Object} response
|
||||||
*/
|
*/
|
||||||
query: function(request, response) {
|
query: function(request, response) {
|
||||||
// If there is a pending request, abort it
|
// If there is a pending request, abort it
|
||||||
@ -904,7 +908,7 @@ var et2_link_entry = et2_inputWidget.extend(
|
|||||||
if((typeof request.no_cache == 'undefined' && !request.no_cache) && request.term in this.cache) {
|
if((typeof request.no_cache == 'undefined' && !request.no_cache) && request.term in this.cache) {
|
||||||
return response(this.cache[request.term]);
|
return response(this.cache[request.term]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remember callback
|
// Remember callback
|
||||||
this.response = response;
|
this.response = response;
|
||||||
|
|
||||||
@ -921,10 +925,10 @@ var et2_link_entry = et2_inputWidget.extend(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* User selected a value
|
* User selected a value
|
||||||
*
|
*
|
||||||
* @param {Object} event
|
* @param {Object} event
|
||||||
* @param {Object} selected
|
* @param {Object} selected
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
select: function(event, selected) {
|
select: function(event, selected) {
|
||||||
if(selected.item.value !== null && typeof selected.item.value == "string")
|
if(selected.item.value !== null && typeof selected.item.value == "string")
|
||||||
@ -959,7 +963,7 @@ var et2_link_entry = et2_inputWidget.extend(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Server found some results
|
* Server found some results
|
||||||
*
|
*
|
||||||
* @param {Array} data
|
* @param {Array} data
|
||||||
*/
|
*/
|
||||||
_results: function(data) {
|
_results: function(data) {
|
||||||
@ -978,7 +982,7 @@ var et2_link_entry = et2_inputWidget.extend(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a link using the current internal values
|
* Create a link using the current internal values
|
||||||
*
|
*
|
||||||
* @param {Object} event
|
* @param {Object} event
|
||||||
* @param {Object} _links
|
* @param {Object} _links
|
||||||
*/
|
*/
|
||||||
@ -1021,9 +1025,9 @@ var et2_link_entry = et2_inputWidget.extend(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sent some links, server has a result
|
* Sent some links, server has a result
|
||||||
*
|
*
|
||||||
* @param {Object} success
|
* @param {Object} success
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
_link_result: function(success) {
|
_link_result: function(success) {
|
||||||
if(success) {
|
if(success) {
|
||||||
@ -1153,7 +1157,7 @@ var et2_link = et2_valueWidget.extend([et2_IDetachedDOM],
|
|||||||
/**
|
/**
|
||||||
* Sets the text to be displayed.
|
* Sets the text to be displayed.
|
||||||
* Used as a callback, so node is provided to make sure we get the right one
|
* Used as a callback, so node is provided to make sure we get the right one
|
||||||
*
|
*
|
||||||
* @param {Object} node
|
* @param {Object} node
|
||||||
* @param {String} _value description
|
* @param {String} _value description
|
||||||
*/
|
*/
|
||||||
@ -1166,7 +1170,7 @@ var et2_link = et2_valueWidget.extend([et2_IDetachedDOM],
|
|||||||
* Creates a list of attributes which can be set when working in the
|
* Creates a list of attributes which can be set when working in the
|
||||||
* "detached" mode. The result is stored in the _attrs array which is provided
|
* "detached" mode. The result is stored in the _attrs array which is provided
|
||||||
* by the calling code.
|
* by the calling code.
|
||||||
*
|
*
|
||||||
* @param {Array} _attrs an array of attributes
|
* @param {Array} _attrs an array of attributes
|
||||||
*/
|
*/
|
||||||
getDetachedAttributes: function(_attrs) {
|
getDetachedAttributes: function(_attrs) {
|
||||||
@ -1335,7 +1339,7 @@ var et2_link_string = et2_valueWidget.extend([et2_IDetachedDOM],
|
|||||||
* Creates a list of attributes which can be set when working in the
|
* Creates a list of attributes which can be set when working in the
|
||||||
* "detached" mode. The result is stored in the _attrs array which is provided
|
* "detached" mode. The result is stored in the _attrs array which is provided
|
||||||
* by the calling code.
|
* by the calling code.
|
||||||
*
|
*
|
||||||
* @param {Array} _attrs an array of attributes
|
* @param {Array} _attrs an array of attributes
|
||||||
*/
|
*/
|
||||||
getDetachedAttributes: function(_attrs) {
|
getDetachedAttributes: function(_attrs) {
|
||||||
@ -1379,7 +1383,7 @@ var et2_link_string = et2_valueWidget.extend([et2_IDetachedDOM],
|
|||||||
this.list = $j(_nodes[0]);
|
this.list = $j(_nodes[0]);
|
||||||
|
|
||||||
this.set_value(_values["value"]);
|
this.set_value(_values["value"]);
|
||||||
|
|
||||||
// Special detached, to prevent DOM node modification of the normal method
|
// Special detached, to prevent DOM node modification of the normal method
|
||||||
this._labelContainer = _nodes.length > 1 ? $j(_nodes[1]) : null;
|
this._labelContainer = _nodes.length > 1 ? $j(_nodes[1]) : null;
|
||||||
if(_values['label'])
|
if(_values['label'])
|
||||||
@ -1515,7 +1519,7 @@ var et2_link_list = et2_link_string.extend(
|
|||||||
// Native DnD - Doesn't play nice with jQueryUI Sortable
|
// Native DnD - Doesn't play nice with jQueryUI Sortable
|
||||||
// Tell jQuery to include this property
|
// Tell jQuery to include this property
|
||||||
jQuery.event.props.push('dataTransfer');
|
jQuery.event.props.push('dataTransfer');
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user