Skip to content

Commit

Permalink
js: overlays vs advanced selection list
Browse files Browse the repository at this point in the history
  • Loading branch information
jluetzen-ilias committed Feb 23, 2015
1 parent b136ae0 commit 24704ec
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
26 changes: 15 additions & 11 deletions Services/Table/templates/default/tpl.table2.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,25 @@
{COLUMN_SELECTOR} {ROW_SELECTOR} {TEMPLATE_SELECTOR} {EXPORT_SELECTOR}

<!-- BEGIN template_editor -->
<div id="{TEMPLATE_CREATE_ID}" class="ilOverlay" style="padding:10px">
{TXT_TEMPLATE_CREATE}:<br />
<input type="text" id="{TEMPLATE_CREATE_ID}_name" name="tbltplcrt" style="width:150px" />
<input type="submit" class="btn btn-default" name="cmd[{TEMPLATE_CREATE_CMD}]" value="{TXT_TEMPLATE_CREATE_SUBMIT}" onclick="if (document.getElementById('{TEMPLATE_CREATE_ID}_name').value == '') { return false; }" />
<div class="ilFloatRight">
<div id="{TEMPLATE_CREATE_ID}" class="ilOverlay" style="padding:10px; margin-top:27px;">
{TXT_TEMPLATE_CREATE}:<br />
<input type="text" id="{TEMPLATE_CREATE_ID}_name" name="tbltplcrt" style="width:150px" />
<input type="submit" class="btn btn-default" name="cmd[{TEMPLATE_CREATE_CMD}]" value="{TXT_TEMPLATE_CREATE_SUBMIT}" onclick="if (document.getElementById('{TEMPLATE_CREATE_ID}_name').value == '') { return false; }" />
</div>
</div>
<!-- END template_editor -->
<!-- BEGIN template_editor_delete -->
<div id="{TEMPLATE_DELETE_ID}" class="ilOverlay" style="padding:10px">
{TXT_TEMPLATE_DELETE}:<br />
<select name="tbltpldel" id="{TEMPLATE_DELETE_ID}_name" style="width:150px">
<!-- BEGIN template_editor_delete_item --><option value="{TEMPLATE_DELETE_OPTION_VALUE}">{TEMPLATE_DELETE_OPTION}</option><!-- END template_editor_delete_item -->
</select>
<input type="submit" class="btn btn-default" name="cmd[{TEMPLATE_DELETE_CMD}]" value="{TXT_TEMPLATE_DELETE_SUBMIT}" onclick="if (document.getElementById('{TEMPLATE_DELETE_ID}_name').value == '') { return false; }" />
<div class="ilFloatRight">
<div id="{TEMPLATE_DELETE_ID}" class="ilOverlay" style="padding:10px; margin-top:27px;">
{TXT_TEMPLATE_DELETE}:<br />
<select name="tbltpldel" id="{TEMPLATE_DELETE_ID}_name" style="width:150px">
<!-- BEGIN template_editor_delete_item --><option value="{TEMPLATE_DELETE_OPTION_VALUE}">{TEMPLATE_DELETE_OPTION}</option><!-- END template_editor_delete_item -->
</select>
<input type="submit" class="btn btn-default" name="cmd[{TEMPLATE_DELETE_CMD}]" value="{TXT_TEMPLATE_DELETE_SUBMIT}" onclick="if (document.getElementById('{TEMPLATE_DELETE_ID}_name').value == '') { return false; }" />
</div>
</div>
<!-- END template_editor_delete -->
<!-- END template_editor -->

</td>
</tr></table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ il.AdvancedSelectionList =
toggle_el: cfg.toggle_el, toggle_class_on: cfg.toggle_class_on,
asynch: cfg.asynch, asynch_url: cfg.asynch_url, auto_hide: cfg.auto_hide});
*/

// hide all overlays on trigger
$("#ilAdvSelListAnchorText_" + id).click(function(e) {
if (typeof il.Overlay != "undefined") {
il.Overlay.hideAllOverlays(e, true);
}
});
},

itemOn: function (obj)
Expand Down
3 changes: 3 additions & 0 deletions Services/UIComponent/Overlay/js/ilOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ il.Overlay = {
// hide all overlays
hideAllOverlays: function (e, force, omit) {
var k, isIn, tgt, el, el_reg;

// hide all dropdowns, too!
$('[data-toggle="dropdown"]').parent().removeClass('open');

for (k in il.Overlay.overlays) {
isIn = false;
Expand Down

0 comments on commit 24704ec

Please sign in to comment.