Changeset 30772


Ignore:
Timestamp:
09/01/16 10:21:48 (4 years ago)
Author:
kjdon
Message:

removing hard coded text fragments from xsl/js files

Location:
main/trunk/greenstone3/web/interfaces/default/js
Files:
2 edited

Legend:

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

    r29280 r30772  
    117117    }
    118118
    119     //show the help message if there are no berries
     119    //show/hide the help message depending if there are berries or not
     120        var help_elem = YAHOO.util.Dom.get('berryHelpMsg');
     121   
    120122    if ( berryList.length == 0 ) {
    121         var berryHelpMsg = document.createElement('span');
    122         berries.appendChild(berryHelpMsg);
    123         berryHelpMsg.appendChild(document.createTextNode('Drag & drop berries here to add documents to your Berry Basket'));
    124         berryHelpMsg.setAttribute('id','berryHelpMsg');
     123        help_elem.style.display='block';
     124    } else {
     125        help_elem.style.display='none';
    125126    }
    126127
     
    226227    berryBasket.className = "show";
    227228
    228     //put the full view link in
    229     var fullView = document.createElement('a');
    230     berries.appendChild(fullView);
    231    
     229    //set url and show full view link
     230        var fullView = YAHOO.util.Dom.get('berryFullViewLink');
    232231    //Find the collection in the cgi parameters
    233232    var url = window.location.href;
     
    244243    }
    245244   
    246     fullView.appendChild(document.createTextNode('Full View »'));
    247245    fullView.setAttribute("href",gs.xsltParams.library_name + "?a=g&sa=berry&c=&s=DisplayList&rt=r&p.c=" + collectionName);
    248     fullView.setAttribute("id","berryFullViewLink");
     246        fullView.style.display='block';
    249247
    250248    //toggle expand/collapse links
     
    288286        collapseLink.style.display = 'none';
    289287    }
    290    
     288    // hide full view link
     289    var fullView = YAHOO.util.Dom.get('berryFullViewLink');
     290    fullView.style.display='none';
    291291}
    292292
  • main/trunk/greenstone3/web/interfaces/default/js/document_scripts.js

    r30764 r30772  
    11var _imageZoomEnabled = false;
    2 // Choose which types of filtering you want: sectionnum, or sectiontitle.
     2// Choose which types of filtering you want: sectionnum, or sectiontitle or both
    33var _filter_on_types = ["sectiontitle", "sectionnum"];
    4 // the text strings for the two radio buttons
    5 var _filter_on_num_text = "pagenum";
    6 var _filter_on_title_text = "title";
     4
    75// are titles numeric match?
    86var _filter_title_numeric = false;
     
    1816/* Here you can choose which save buttons you like. Choose from 'save', 'rebuild', 'saveandrebuild' */
    1917var save_and_rebuild_buttons = ["saveandrebuild"];
    20 
    21 var save_button_text = "Save changes";
    22 var rebuild_button_text = "Rebuild";
    23 var save_and_rebuild_button_text = "Save and Rebuild";
     18//var save_and_rebuild_buttons = ["save", "rebuild", "saveandrebuild"];
     19
    2420
    2521/*Array to store init states of metadata fields and text*/
     
    752748  else if (_filter_on_types.length == 1) {
    753749    if (_filter_on_types[0] == "sectionnum") {
    754       button_div.html("(<input type='radio' name='filterOn' value='num' checked>"+_filter_on_num_text+"</input>)");
     750      button_div.html("(<input type='radio' name='filterOn' value='num' checked>"+gs.text.doc.filter.pagenum+"</input>)");
    755751    } else {
    756       button_div.html("(<input type='radio' name='filterOn' value='title' checked>"+_filter_on_title_text+"</input>)");
     752      button_div.html("(<input type='radio' name='filterOn' value='title' checked>"+gs.text.doc.filter.title+"</input>)");
    757753    }
    758754  } else {
    759755    // should be both options
    760     button_div.html("<input type='radio' name='filterOn' value='num' checked>"+_filter_on_num_text+"</input><input type='radio' name='filterOn' value='title'>"+_filter_on_title_text+"</input>");
     756    button_div.html("<input type='radio' name='filterOn' value='num' checked>"+gs.text.doc.filter.pagenum+"</input><input type='radio' name='filterOn' value='title'>"+gs.text.doc.filter.title+"</input>");
    761757  }
    762758}
     
    13681364        var saveButton = $("<button>", {"id": "saveButton", "class": "ui-state-default ui-corner-all"});
    13691365        saveButton.click(save);
    1370         saveButton.html(save_button_text);
     1366        saveButton.html(gs.text.de.save);
    13711367        editBar.append(saveButton);
    13721368      } else if(button_type == "rebuild") {
    13731369        var rebuildButton = $("<button>", {"id": "rebuildButton", "class": "ui-state-default ui-corner-all"});
    13741370        rebuildButton.click(rebuildCurrentCollection);
    1375         rebuildButton.html(rebuild_button_text);
     1371        rebuildButton.html(gs.text.de.rebuild);
    13761372        editBar.append(rebuildButton);
    13771373      } else if (button_type == "saveandrebuild") {
    13781374        var saveAndRebuildButton = $("<button>", {"id": "saveAndRebuildButton", "class": "ui-state-default ui-corner-all"});
    13791375        saveAndRebuildButton.click(saveAndRebuild);
    1380         saveAndRebuildButton.html(save_and_rebuild_button_text);
     1376        saveAndRebuildButton.html(gs.text.de.saverebuild);
    13811377        editBar.append(saveAndRebuildButton);
    13821378
     
    14611457*/
    14621458  if (metadataChanges.length ==0) {
    1463     console.log ("... No changes detected. ");
     1459      console.log(gs.text.de.no_changes);
    14641460    return;
    14651461  }
Note: See TracChangeset for help on using the changeset viewer.