<commit_before><%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="im" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/string-1.1" prefix="str" %>
<%@ taglib uri="/WEB-INF/functions.tld" prefix="imf" %>



<!-- minePathwaysDisplayer.jsp -->

<div id="minepathwaysdisplayer-wrapper" class="wrapper" style="display: block;">

  <div id="mine-pathway-displayer" class="collection-table column-border">

    <div class="header">
      <h3>New Pathways Displayer</h3>
      <p>Pathway data from other Mines for homologues of this gene.</p>
    </div>

    <div id="pathwaysappcontainer"></div>


  </div>
</div>



<script>

(function(){

  var $ = jQuery;

  console.log("STARTED");
  var paths = {js: {}, css: {}};

  <c:set var="section" value="pathways-displayer"/>

  <c:forEach var="res" items="${imf:getHeadResources(section, PROFILE.preferences)}">
    
      paths["${res.type}"]["${res.key}".split(".").pop()] = "${res.url}";
  </c:forEach>

  console.log(JSON.stringify(paths, null, 2));


  var imload = function(){
    intermine.load({
      'js': {
          'Q': {
            'path': paths.js.Q
          },
          'jQuery': {
            'path': paths.js.jQuery,
            'test': function(){
              if (+($.fn.jquery.split(".")[0]) < 3) {
                throw "Version error.";
              }
            }
          },
          'Backbone': {
            'path': paths.js.Backbone,
            'depends': ['_', 'jQuery']
          },
          '_': {
            'path': paths.js._
          },
          'MyFirstCommonJSApp': {
            'path': paths.js.MyFirstCommonJSApp,
            'depends': ['Q', 'Backbone']
          }
      },
      'css': {
        'pathwaysDisplayerCSS': {
          'path': paths.css.pathwaysDisplayerCSS
        }
      }
    }, function(err) {

      if (err) throw err;

      friendlyMines = {};

      <c:forEach items="${minesForPathways}" var="entry">
        friendlyMines["${entry.key.name}"] = "${entry.key.url}";
        </c:forEach>

        friendlyMines['${WEB_PROPERTIES["project.title"]}'] = $SERVICE.root;

        require('MyFirstCommonJSApp')(
      {
             
              friendlyMines: friendlyMines,                        
              gene: "${gene.primaryIdentifier}",
              target: "#pathwaysappcontainer"
      });

    });
  };

  try {

    imload();

  } catch (error) {
    $('#pathwaysappcontainer').html(
      $('<div/>', {'text': 'This app requires jQuery 2.x.x', 'style': 'padding-left: 14px; font-weight: bold'})
    );

    $('#mine-pathway-displayer').addClass("warning");
  }
})();





</script>

    



<!-- /minePathwaysDisplayer.jsp --><commit_msg>Updated web properties to use jQuery 2.0.3<commit_after><%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="im" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/string-1.1" prefix="str" %>
<%@ taglib uri="/WEB-INF/functions.tld" prefix="imf" %>



<!-- minePathwaysDisplayer.jsp -->

<div id="minepathwaysdisplayer-wrapper" class="wrapper" style="display: block;">

  <div id="mine-pathway-displayer" class="collection-table column-border">

    <div class="header">
      <h3>New Pathways Displayer</h3>
      <p>Pathway data from other Mines for homologues of this gene.</p>
    </div>

    <div id="pathwaysappcontainer"></div>


  </div>
</div>



<script>

(function(){

  var $ = jQuery;

  console.log("STARTED");
  var paths = {js: {}, css: {}};

  <c:set var="section" value="pathways-displayer"/>

  <c:forEach var="res" items="${imf:getHeadResources(section, PROFILE.preferences)}">
    
      paths["${res.type}"]["${res.key}".split(".").pop()] = "${res.url}";
  </c:forEach>

  console.log(JSON.stringify(paths, null, 2));


  var imload = function(){
    intermine.load({
      'js': {
          'Q': {
            'path': paths.js.Q
          },
          'jQuery': {
            'path': paths.js.jQuery,
            'test': function(){
              if (+($.fn.jquery.split(".")[0]) < 2) {
                throw "Version error.";
              }
            }
          },
          'Backbone': {
            'path': paths.js.Backbone,
            'depends': ['_', 'jQuery']
          },
          '_': {
            'path': paths.js._
          },
          'MyFirstCommonJSApp': {
            'path': paths.js.MyFirstCommonJSApp,
            'depends': ['Q', 'Backbone']
          }
      },
      'css': {
        'pathwaysDisplayerCSS': {
          'path': paths.css.pathwaysDisplayerCSS
        }
      }
    }, function(err) {

      if (err) throw err;

      friendlyMines = {};

      <c:forEach items="${minesForPathways}" var="entry">
        friendlyMines["${entry.key.name}"] = "${entry.key.url}";
        </c:forEach>

        friendlyMines['${WEB_PROPERTIES["project.title"]}'] = $SERVICE.root;

        require('MyFirstCommonJSApp')(
      {
             
              friendlyMines: friendlyMines,                        
              gene: "${gene.primaryIdentifier}",
              target: "#pathwaysappcontainer"
      });

    });
  };

  try {

    imload();

  } catch (error) {
    $('#pathwaysappcontainer').html(
      $('<div/>', {'text': 'This app requires jQuery 2.x.x', 'style': 'padding-left: 14px; font-weight: bold'})
    );

    $('#mine-pathway-displayer').addClass("warning");
  }
})();





</script>

    



<!-- /minePathwaysDisplayer.jsp -->
{'fraction_non_alphanumeric': 0.2047192839707079, 'fraction_numerical': 0.004393816110659072, 'mean_word_length': 2.29544235924933, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 65, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5393727', 'n_tokens_mistral': 2152, 'n_tokens_neox': 2030, 'n_words': 322}