Changeset 31770

Show
Ignore:
Timestamp:
30.06.2017 14:30:49 (5 months ago)
Author:
kjdon
Message:

hiding the metadata set chooser if display_metadata_set_selector is not true. still need to keep it in the page cos other things use it

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/documentedit_scripts.js

    r31748 r31770  
    66/* if true, will look through all the metadata for the document, and add each namespace into the list of metadata sets. If set to false, will only add in the ones defined in setStaticMetadataSets function (defined below) - override this function to make a custom list of sets */ 
    77var dynamic_metadata_set_list = true; 
     8/* if false, will hide the metadata list selector. So the user will only get to see the default metadata set. */ 
     9var display_metadata_set_selector = true; 
    810/* if true, will make the editing controls stay visible even on page scrolling */ 
    911var keep_editing_controls_visible = true; 
     
    2830*/ 
    2931 
     32 
    3033/************************ 
    3134* METADATA EDIT SCRIPTS * 
     
    101104     
    102105    var visibility = (visible ? "" : "none"); 
     106    if (display_metadata_set_selector == true) { 
    103107    $("#metadataListLabel, #metadataSetList").css("display", visibility); 
    104      
     108    } 
    105109    $(".editMetadataButton").each(function() 
    106110    { 
     
    153157    var editBar = $("#editBarLeft"); 
    154158     
     159 
    155160    var visibleMetadataList = $("<select>", {"id": "metadataSetList", "class": "ui-state-default"}); 
    156161    setStaticMetadataSets(visibleMetadataList); 
    157  
     162     
     163    if (display_metadata_set_selector == true) { 
    158164    var metadataListLabel = $("<span>", {"id": "metadataListLabel", "style": "margin-left:20px;"}); 
    159     metadataListLabel.html(gs.text.de.visible_metadata);  
     165    metadataListLabel.html(gs.text.de.visible_metadata);  
    160166    editBar.append(metadataListLabel); 
     167    } else { 
     168    visibleMetadataList.css ("display", "none"); 
     169    } 
    161170    editBar.append(visibleMetadataList); 
    162171    visibleMetadataList.change(onVisibleMetadataSetChange); 
    163172    editBar.append("<br>"); 
     173     
    164174    for (var i=0; i< save_and_rebuild_buttons.length; i++) { 
    165175      var button_type = save_and_rebuild_buttons[i];