/** Javascript file for editing a single document's content - metadata and text */ /** uses other functions in documentedit_scripts_util.js */ /* some vars for document editing */ /* 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 */ var dynamic_metadata_set_list = true; /* if false, will hide the metadata list selector. So the user will only get to see the default metadata set. */ var display_metadata_set_selector = true; /* if true, will make the editing controls stay visible even on page scrolling */ var keep_editing_controls_visible = true; /* Here you can choose which save buttons you like. Choose from 'save', 'rebuild', 'saveandrebuild' */ var save_and_rebuild_buttons = ["saveandrebuild"]; //var save_and_rebuild_buttons = ["save", "rebuild", "saveandrebuild"]; /* What kind of metadata element selection do we provide? plain: just a text input box fixedlist: a drop down menu with a fixed list of options (provided by the availableMetadataElements list) autocomplete: a text input box with a list of suggestions to choose from (provided by the availableMetadataElements list). Allows additional input other than the fixed list */ var new_metadata_field_input_type = "plain"; /* add all metadata button? only valid with fixedlist or autocomplete metadata element selection */ var enable_add_all_metadata_button = true; /* Metadata elements to be used in the fixedlist/autocomplete options above */ var availableMetadataElements = ["dc.Title", "dc.Subject"]; /* metadata elements that have a list of values/suggestions */ var autocompleteMetadata = new Array(); /* for each metadata element specified here, one should provide an array of values. The name is the meta_name + "_values", but you must strip . and _ from the name. for example var autocompleteMetadata = ["dc.Subject"]; var dcSubject_values = ["Kings", "Queens", "others"]; */ /* The metadata specified in multiValuedMetadata array will be treated as a delimited list, using mvm_delimiter. On saving, the values will be separated and saved individually */ var multiValuedMetadata = new Array(); // eg ["xx.Person", "xx.Location"]; var mvm_delimiter = ";"; /************************ * METADATA EDIT SCRIPTS * ************************/ function addEditMetadataLink(cell) { cell = $(cell); var id = cell.attr("id").substring(6); var metaTable = gs.jqGet("meta" + id); var row = cell.parent(); var newCell = $("", { "style": "font-size:0.7em; padding:0px 10px", "class": "editMetadataButton" }); var linkSpan = $("", { "class": "ui-state-default ui-corner-all", "style": "padding: 2px; float:left;" }); var linkLabel = $("" + gs.text.de.edit_metadata + ""); var linkIcon = $("", { "class": "ui-icon ui-icon-folder-collapsed" }); newCell.linkIcon = linkIcon; newCell.linkLabel = linkLabel; var uList = $("