<commit_before>Joshfire.define(['joshfire/class', 'joshfire/tree.ui', 'joshfire/uielements/list', 'joshfire/uielements/panel', 'joshfire/uielements/panel.manager', 'joshfire/uielements/button', 'src/ui-components'], function(Class, UITree, List, Panel, PanelManager, Button, UI) {

  return Class(UITree, {

    buildTree: function() {

      var app = this.app;

      return [
        {
          id: 'header',
          type: Panel,
          htmlClass: 'header',
          children: [
            {
              id: 'prev',
              type: Button,
              label: 'Prev',
              autoShow: false
            },
            {
              id: 'title', // the title or the logo
              type: Panel,
              innerTemplate: UI.tplHeader
            }
          ]
        },
        {
          id: 'content',
          type: PanelManager,
          uiMaster: '/footer',
          children: [
            {
              id: 'itemList',
              //scroller: false, // do not use iScroll it's crappy crap (and doesn't work with a grid made of floats)
              type: List,
              htmlClass: 'abs100',
              loadingTemplate: '<div class="loading"></div>',
              itemTemplate: "<li id='<%=itemHtmlId%>' " + 
                            "data-josh-ui-path='<%= path %>' data-josh-grid-id='<%= item.id %>'" + 
                            "class='josh-List joshover item-<%= item.itemType.replace('/', '') %> mainitemlist " + 
                            // grid view
                            "<% if (item.itemType === 'ImageObject') { %>" +
                              " grid" +
                            "<% } else { %>" +
                            // list view
                              " list" +
                            "<% } %>" +
                            "' >" +
                            "<%= itemInner %>" + 
                            "</li>",
              itemInnerTemplate:
                '<% if (item.itemType === "VideoObject") { %>' +
                  '<div class="title"><%= item.name %></div>' +
                  UI.getItemDescriptionTemplate(70) +
                  UI.tplItemPreview +
                  '<span class="list-arrow"></span>' +
                '<% } else if (item.itemType === "ImageObject") { %>' +
                  UI.tplItemThumbnail +
                '<% } else if (item.itemType === "Article/Status") { %>' +
                  UI.tplTweetItem +
                '<% } else if (item.itemType === "Event") { %>' +
                  UI.tplEventItem +
                '<% } else { %>' +
                  '<%= item.name %><span class="list-arrow"></span>' +
                '<% } %>'
            },
            {
              id: 'detail',
              type: Panel,
              loadingTemplate: '<div class="loading"></div>',
              uiDataMaster: '/content/itemList',              
              autoShow: false,
              children: [
                {
                  // Article
                  id: 'article',
                  type: Panel,
                  uiDataMaster: '/content/itemList',
                  forceDataPathRefresh: true,
                  loadingTemplate: '<div class="loading"></div>',<commit_msg>smal work on spreadsheet<commit_after>Joshfire.define(['joshfire/class', 'joshfire/tree.ui', 'joshfire/uielements/list', 'joshfire/uielements/panel', 'joshfire/uielements/panel.manager', 'joshfire/uielements/button', 'src/ui-components'], function(Class, UITree, List, Panel, PanelManager, Button, UI) {

  return Class(UITree, {

    buildTree: function() {

      var app = this.app;

      return [
        {
          id: 'header',
          type: Panel,
          htmlClass: 'header',
          children: [
            {
              id: 'prev',
              type: Button,
              label: 'Prev',
              autoShow: false
            },
            {
              id: 'title', // the title or the logo
              type: Panel,
              innerTemplate: UI.tplHeader
            }
          ]
        },
        {
          id: 'content',
          type: PanelManager,
          uiMaster: '/footer',
          children: [
            {
              id: 'itemList',
              //scroller: false, // do not use iScroll it's crappy crap (and doesn't work with a grid made of floats)
              type: List,
              htmlClass: 'abs100',
              loadingTemplate: '<div class="loading"></div>',
              itemTemplate: "<li id='<%=itemHtmlId%>' " + 
                            "data-josh-ui-path='<%= path %>' data-josh-grid-id='<%= item.id %>'" + 
                            "class='josh-List joshover item-<%= item.itemType.replace('/', '') %> mainitemlist " + 
                            // grid view
                            "<% if (item.itemType === 'ImageObject') { %>" +
                              " grid" +
                            "<% } else { %>" +
                            // list view
                              " list" +
                            "<% } %>" +
                            "' >" +
                            "<%= itemInner %>" + 
                            "</li>",
              itemInnerTemplate:
                '<% if (item.itemType === "VideoObject") { %>' +
                  '<div class="title"><%= item.name %></div>' +
                  UI.getItemDescriptionTemplate(70) +
                  UI.tplItemPreview +
                  '<span class="list-arrow"></span>' +
                '<% } else if (item.itemType === "ImageObject") { %>' +
                  UI.tplItemThumbnail +
                '<% } else if (item.itemType === "Article/Status") { %>' +
                  UI.tplTweetItem +
                '<% } else if (item.itemType === "Event") { %>' +
                  UI.tplEventItem +   
                //'<% } else if (item.itemType === "Article && item.url && item.url.indexOf("spreadsheed.google.com") != -1) { %>' +
                //  UI.tplEventItem +                    
                '<% } else { %>' +
                // check if 
                  UI.tplItemPreview +
                  '<%= item.name %><span class="list-arrow"></span>' +
                '<% } %>'
            },
            {
              id: 'detail',
              type: Panel,
              loadingTemplate: '<div class="loading"></div>',
              uiDataMaster: '/content/itemList',              
              autoShow: false,
              children: [
                {
                  // Article
                  id: 'article',
                  type: Panel,
                  uiDataMaster: '/content/itemList',
                  forceDataPathRefresh: true,
                  loadingTemplate: '<div class="loading"></div>',
{'fraction_non_alphanumeric': 0.14741506646971936, 'fraction_numerical': 0.0016248153618906942, 'mean_word_length': 1.0962848297213623, 'pattern_counts': {'":': 0, '<': 64, '<?xml version=': 0, '>': 64, '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': 2, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5414461', 'n_tokens_mistral': 1819, 'n_tokens_neox': 1732, 'n_words': 335}