@@ -329,10 +329,10 @@ ilios.dom.generateAutoCompleteDialogMarkup = function (args) {
329
329
* whose id is provided; the elements represent the UI
330
330
* single-selection widget
331
331
* hide_autocomplete_input: if non-null, then the autocomplete input will be hidden
332
- * tab_title: the title for the tab containing the selection widget;
333
- * panel_title_text : the header title text for the panel (not to be
334
- * confused with the title bar text which will
335
- * be "Please select items" )
332
+ * tab_title: the title for the tab containing the selection widget (optional, defaults to "Available items")
333
+ * selected_items_title : the title for the selected items list (optional, defaults to "Selected items")
334
+ * title: the widget title (optional, defaults to "Please select items")
335
+ * panel_title_text: the header title text for the panel (optional, not displayed when not given )
336
336
* dom_root: the id of the DOM element into which this markup should
337
337
* be inserted
338
338
* panel_width: if this is non-null, it is expected to a valid CSS
@@ -374,17 +374,20 @@ ilios.dom.generateGenericDialogMarkupAndWireContent = function (use, less, args)
374
374
var autoCompleteTextFieldId = args [ 'id_uniquer' ] + '_auto_comp_input' ;
375
375
var selectedItemListElement = args [ 'id_uniquer' ] + '_selected_item_list' ;
376
376
var autoCompleter = null ;
377
- var aStr = ilios_i18nVendor . getI18NString ( 'general.phrases.select_items' ) ;
377
+ var aStr = args [ 'title' ] || ilios_i18nVendor . getI18NString ( 'general.phrases.select_items' ) ;
378
378
var noAutoCompleter = ( args [ 'remote_data' ] == null ) ;
379
379
var showAutoCompleteInput = ( args [ 'hide_autocomplete_input' ] == null ) ;
380
+ var panelTitle = args [ 'panel_title_text' ] || '' ;
380
381
381
382
contents += '<div class="visuallyhidden" id="' + autoCompleteHiddenContainerId + '"></div>\n' ;
382
383
383
384
contents += '<div class="hd">' + aStr + '</div>\n' ;
384
385
contents += '<div class="bd">\n' ;
385
386
contents += '<div class="dialog_wrap">' ;
386
387
387
- contents += '<p>' + args [ 'panel_title_text' ] + '</p>' ;
388
+ if ( panelTitle ) {
389
+ contents += '<p>' + panelTitle + '</p>' ;
390
+ }
388
391
389
392
if ( args [ 'indeterminate_loading_id' ] != null ) {
390
393
contents += '<div id="' + args [ 'indeterminate_loading_id' ]
@@ -396,7 +399,7 @@ ilios.dom.generateGenericDialogMarkupAndWireContent = function (use, less, args)
396
399
397
400
contents += '<div class="dialog_left">' ;
398
401
399
- aStr = ilios_i18nVendor . getI18NString ( 'general.phrases.selected_items' ) ;
402
+ aStr = args [ 'selected_items_title' ] || ilios_i18nVendor . getI18NString ( 'general.phrases.selected_items' ) ;
400
403
contents += '<label class="picked_label" for="' + selectedItemListElement + '">' ;
401
404
contents += aStr ;
402
405
contents += '</label>' ;
@@ -966,9 +969,8 @@ ilios.dom.generateTreeSelectionDialogMarkupAndWireContent = function (use, less,
966
969
* whose id is provided; the elements represent the UI
967
970
* single-selection widget
968
971
* tab_title: the title for the tab containing the selection widget
969
- * panel_title_text: the header title text for the panel (not to be
970
- * confused with the title bar text which will
971
- * be "Please select items")
972
+ * title: the widget title (optional, defaults to "Please select items")
973
+ * panel_title_text: the header title text for the panel (optional, not displayed when not given)
972
974
* dom_root: the id of the DOM element into which this markup should
973
975
* be inserted
974
976
* panel_width: if this is non-null, it is expected to a valid CSS
@@ -993,13 +995,15 @@ ilios.dom.generateSelectAndCloseDialogMarkupAndWireContent = function (use, less
993
995
var panelWidth = ( args [ 'panel_width' ] != null ) ? args [ 'panel_width' ] : "600px" ;
994
996
var dialog = null ;
995
997
var displayOnTriggerHandler = null ;
996
- var i18nStr = ilios_i18nVendor . getI18NString ( 'general.phrases.select_items' ) ;
998
+ var i18nStr = args [ 'title' ] || ilios_i18nVendor . getI18NString ( 'general.phrases.select_items' ) ;
999
+ var panelTitleText = args [ 'panel_title_text' ] || '' ;
997
1000
998
1001
contents += '<div class="hd">' + i18nStr + '</div>\n' ;
999
1002
contents += '<div class="bd">\n' ;
1000
1003
1001
- contents += '<p>' + args [ 'panel_title_text' ] + '</p>' ;
1002
-
1004
+ if ( panelTitleText ) {
1005
+ contents += '<p>' + panelTitleText + '</p>' ;
1006
+ }
1003
1007
1004
1008
// YUI -- IF THERE'S NO FORM INSIDE A DIALOG DOM, IT REVEALS A YUI BUG
1005
1009
contents += '<form method="POST" action="matters not at all">\n' ;
0 commit comments