mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
More fixes forjQuery/jQueryUI update issues
This commit is contained in:
parent
f2906a1052
commit
f4a6c9859a
@ -88,9 +88,9 @@ var et2_checkbox = et2_inputWidget.extend(
|
||||
if(_value == this.options.selected_value ||
|
||||
_value && this.options.selected_value == this.__proto__.attributes.selected_value["default"] &&
|
||||
_value != this.options.unselected_value) {
|
||||
this.input.attr("checked", "checked");
|
||||
this.input.prop("checked", true);
|
||||
} else {
|
||||
this.input.removeAttr("checked");
|
||||
this.input.prop("checked", false);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -99,7 +99,7 @@ var et2_checkbox = et2_inputWidget.extend(
|
||||
* Override default to return unchecked value
|
||||
*/
|
||||
getValue: function() {
|
||||
if(this.input.attr("checked")) {
|
||||
if(this.input.prop("checked")) {
|
||||
return this.options.selected_value;
|
||||
} else {
|
||||
return this.options.unselected_value;
|
||||
|
@ -233,16 +233,19 @@ var et2_dialog = et2_widget.extend({
|
||||
* Clean up dialog
|
||||
*/
|
||||
destroy: function() {
|
||||
// Un-dialog the dialog
|
||||
this.div.dialog("destroy");
|
||||
|
||||
if(this.template)
|
||||
if(this.div != null)
|
||||
{
|
||||
this.template.clear();
|
||||
this.template = null;
|
||||
}
|
||||
// Un-dialog the dialog
|
||||
this.div.dialog("destroy");
|
||||
|
||||
this.div = null;
|
||||
if(this.template)
|
||||
{
|
||||
this.template.clear();
|
||||
this.template = null;
|
||||
}
|
||||
|
||||
this.div = null;
|
||||
}
|
||||
|
||||
// Call the inherited constructor
|
||||
this._super.apply(this, arguments);
|
||||
|
@ -85,7 +85,7 @@ var et2_diff = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||
buttons: [{text: self.egw().lang('ok'), click: function() {jQuery(this).dialog("close");}}],
|
||||
close: function(event, ui) {
|
||||
// Need to destroy the dialog, etemplate widget needs divs back where they were
|
||||
diff.dialog("destroy");
|
||||
dialog_div.dialog("destroy");
|
||||
self.minify(this);
|
||||
|
||||
// Put it back where it came from, or et2 will error when clear() is called
|
||||
|
@ -185,8 +185,11 @@ var et2_favorites = et2_dropdown_button.extend([et2_INextmatchHeader],
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
this.popup.dialog("destroy");
|
||||
this.popup = null;
|
||||
if(this.popup != null)
|
||||
{
|
||||
this.popup.dialog("destroy");
|
||||
this.popup = null;
|
||||
}
|
||||
if(this.sidebox_target.length)
|
||||
{
|
||||
this.sidebox_target
|
||||
|
@ -140,6 +140,7 @@ var et2_file = et2_inputWidget.extend(
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
this._super.apply(this, arguments);
|
||||
this.node = null;
|
||||
this.input = null;
|
||||
this.progress = null;
|
||||
|
@ -115,7 +115,11 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],
|
||||
* Finish initialization which was skipped until tab was selected
|
||||
*/
|
||||
finishInit: function() {
|
||||
|
||||
// No point with no ID
|
||||
if(!this.options.value || !this.options.value.id)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this._filters = {
|
||||
record_id: this.options.value.id,
|
||||
appname: this.options.value.app,
|
||||
|
@ -526,7 +526,8 @@ var et2_link_entry = et2_inputWidget.extend(
|
||||
return false;
|
||||
},
|
||||
minLength: self.minimum_characters,
|
||||
disabled: self.options.disabled
|
||||
disabled: self.options.disabled,
|
||||
appendTo: self.div
|
||||
});
|
||||
|
||||
// Custom display (colors)
|
||||
@ -711,7 +712,7 @@ var et2_link_entry = et2_inputWidget.extend(
|
||||
}
|
||||
this.options.value = _value;
|
||||
|
||||
jQuery("option[value='"+_value.app+"']",this.app_select).attr("selected",true);
|
||||
jQuery("option[value='"+_value.app+"']",this.app_select).prop("selected",true);
|
||||
this.app_select.hide();
|
||||
this.div.addClass("no_app");
|
||||
},
|
||||
|
@ -98,9 +98,9 @@ var et2_radiobox = et2_inputWidget.extend(
|
||||
*/
|
||||
set_value: function(_value) {
|
||||
if(_value == this.options.set_value) {
|
||||
this.input.attr("checked", "checked");
|
||||
this.input.prop("checked", true);
|
||||
} else {
|
||||
this.input.removeAttr("checked");
|
||||
this.input.prop("checked", false);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -186,7 +186,7 @@ var et2_selectAccount = et2_selectbox.extend(
|
||||
|
||||
// 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("autocomplete").menu.element.appendTo(this.node);
|
||||
this.search_widget.search.data("ui-autocomplete").menu.element.appendTo(this.node);
|
||||
},this));
|
||||
this.search = jQuery(document.createElement("li"))
|
||||
.appendTo(this.multiOptions.prev().find('ul'));
|
||||
@ -405,7 +405,7 @@ var et2_selectAccount = et2_selectbox.extend(
|
||||
|
||||
// Override link-entry auto-complete for custom display
|
||||
// Don't show normal drop-down
|
||||
search_widget.search.data("autocomplete")._suggest = function(items) {
|
||||
search_widget.search.data("ui-autocomplete")._suggest = function(items) {
|
||||
jQuery.each(items, function (index, item) {
|
||||
self._add_search_result(results, item);
|
||||
});
|
||||
|
@ -467,24 +467,24 @@ var et2_selectbox = et2_inputWidget.extend(
|
||||
// Unchanged
|
||||
if(_value == this.value) return;
|
||||
}
|
||||
jQuery("option",this.input).attr("selected", false);
|
||||
jQuery("option",this.input).prop("selected", false);
|
||||
if(typeof _value == "array")
|
||||
{
|
||||
for(var i = 0; i < _value.length; i++)
|
||||
{
|
||||
jQuery("option[value='"+_value[i]+"']", this.input).attr("selected", true);
|
||||
jQuery("option[value='"+_value[i]+"']", this.input).prop("selected", true);
|
||||
}
|
||||
}
|
||||
else if (typeof _value == "object")
|
||||
{
|
||||
for(var i in _value)
|
||||
{
|
||||
jQuery("option[value='"+_value[i]+"']", this.input).attr("selected", true);
|
||||
jQuery("option[value='"+_value[i]+"']", this.input).prop("selected", true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(jQuery("option[value='"+_value+"']", this.input).attr("selected", true).length == 0)
|
||||
if(jQuery("option[value='"+_value+"']", this.input).prop("selected", true).length == 0)
|
||||
{
|
||||
if(this.options.select_options[_value])
|
||||
{
|
||||
@ -499,24 +499,24 @@ var et2_selectbox = et2_inputWidget.extend(
|
||||
},
|
||||
|
||||
set_multi_value: function(_value) {
|
||||
jQuery("input",this.multiOptions).attr("checked", false);
|
||||
jQuery("input",this.multiOptions).prop("checked", false);
|
||||
if(typeof _value == "array")
|
||||
{
|
||||
for(var i = 0; i < _value.length; i++)
|
||||
{
|
||||
jQuery("input[value='"+_value[i]+"']", this.multiOptions).attr("checked", true);
|
||||
jQuery("input[value='"+_value[i]+"']", this.multiOptions).prop("checked", true);
|
||||
}
|
||||
}
|
||||
else if (typeof _value == "object")
|
||||
{
|
||||
for(var i in _value)
|
||||
{
|
||||
jQuery("input[value='"+_value[i]+"']", this.multiOptions).attr("checked", true);
|
||||
jQuery("input[value='"+_value[i]+"']", this.multiOptions).prop("checked", true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(jQuery("input[value='"+_value+"']", this.multiOptions).attr("checked", true).length == 0)
|
||||
if(jQuery("input[value='"+_value+"']", this.multiOptions).prop("checked", true).length == 0)
|
||||
{
|
||||
this.egw().debug("warning", "Tried to set value that isn't an option", this, _value);
|
||||
}
|
||||
@ -726,7 +726,7 @@ var et2_selectbox_ro = et2_selectbox.extend([et2_IDetachedDOM],
|
||||
// Translate the options
|
||||
if(!this.options.no_lang)
|
||||
{
|
||||
if (typeof _options[key] === 'object')
|
||||
if (typeof _options[key] === 'object' && _options[key] != null)
|
||||
{
|
||||
if(_options[key]["label"]) _options[key]["label"] = this.egw().lang(_options[key]["label"]);
|
||||
if(_options[key]["title"]) _options[key]["title"] = this.egw().lang(_options[key]["title"]);
|
||||
|
@ -53,6 +53,7 @@ var et2_url = et2_textbox.extend(
|
||||
this.input.unbind();
|
||||
}
|
||||
this._button = null;
|
||||
this._super.apply(this);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -804,7 +804,7 @@ div.message.floating {
|
||||
|
||||
.nextmatch_header .header_count {
|
||||
padding: 0px 20px;
|
||||
margin: 5px 20px 0px;
|
||||
margin: 6px 20px 0px;
|
||||
border: 1px solid #E0E0E0;
|
||||
float:right;
|
||||
font-size: 150%;
|
||||
@ -837,8 +837,8 @@ div.message.floating {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
/* Favorites */
|
||||
.nextmatch_header div#favorite_wrapper {
|
||||
margin-top: 8px;
|
||||
.nextmatch_header div[id$=favorite_wrapper] {
|
||||
margin-top: 6px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
#nm_favorites_popup_filters .filter_id, #nm_favorites_popup_filters .filter_value {
|
||||
@ -848,7 +848,7 @@ div.message.floating {
|
||||
.nextmatch_header ul.favorites {
|
||||
min-width: 20ex;
|
||||
}
|
||||
.nextmatch_header .favorites li a {
|
||||
.nextmatch_header .favorites li .ui-menu .ui-menu-item a {
|
||||
text-indent: -22px;
|
||||
margin-left: 21px;
|
||||
}
|
||||
@ -862,6 +862,7 @@ div.message.floating {
|
||||
margin-right: 1ex;
|
||||
}
|
||||
.favorites div.ui-icon-trash {
|
||||
position: relative;
|
||||
float:right;
|
||||
display:none;
|
||||
}
|
||||
@ -891,12 +892,14 @@ div.message.floating {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.sidebox-favorites .favorites div.ui-icon-heart{
|
||||
position: relative;
|
||||
float: left;
|
||||
display:inline-block;
|
||||
margin: -3px 1px 0px 1px;
|
||||
}
|
||||
.sidebox-favorites .favorites div.ui-icon-trash{
|
||||
margin-top: -3px;
|
||||
margin-top: -5px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
.nextmatch_sortheader {
|
||||
color: #003075;
|
||||
|
Loading…
Reference in New Issue
Block a user