Etemplate - Link widget - Stop app selection from hiding when you try to click it, fix app selection that only selected addressbook.

This commit is contained in:
nathangray 2017-09-14 09:52:19 -06:00
parent 5b4fd418bf
commit 6c7356c48e

View File

@ -712,7 +712,8 @@ var et2_link_entry = (function(){ "use strict"; return et2_inputWidget.extend(
self.app_select.show(); self.app_select.show();
} }
}}) }})
.blur(function() { .blur(function(e) {
if(self.div.has(e.relatedTarget).length) return;
if(self.options.app_icons) if(self.options.app_icons)
{ {
// Adjust width, leave room for app select & link button // Adjust width, leave room for app select & link button
@ -886,10 +887,18 @@ var et2_link_entry = (function(){ "use strict"; return et2_inputWidget.extend(
if(this.options.app_icons) if(this.options.app_icons)
{ {
var self = this;
this.div.addClass('app_icons'); this.div.addClass('app_icons');
this.app_select.iconselectmenu({width: 50}) this.app_select.iconselectmenu({
width: 50,
change: function() {
window.setTimeout(function()
{
self.app_select.trigger("change");
}, 0);
}
})
.iconselectmenu( "menuWidget" ); .iconselectmenu( "menuWidget" );
this.app_select.iconselectmenu('widget').hide(); this.app_select.iconselectmenu('widget').hide();
} }
return this._super.apply(this,arguments); return this._super.apply(this,arguments);