<commit_before>/* ************************************************************************

  flicky

  Copyright:
    2009 Deutsche Telekom AG, Germany, http://telekom.com

 ************************************************************************ */

/**
 * Start View
 */
qx.Class.define("flicky.view.mobile.Recent", {
  extend : unify.view.mobile.RemoteView,
  type : "singleton",

  members : 
  {
    __content : null,
  

    // overridden
    getTitle : function(type, param) {
      return "Recent";
    },

    
    // overridden
    _createView : function() 
    {
      var layer = new unify.ui.mobile.Layer(this);
      var titlebar = new unify.ui.mobile.TitleBar(this);
      layer.add(titlebar);
      
      var content = this.__content = new unify.ui.mobile.Content;
      content.add("Hello World");
      layer.add(content);

      return layer;
    },
    
    
    // overridden
    _getBusinessObject : function() {
      return flicky.business.Flickr.getInstance();
    },
    
    
    // overridden
    _getServiceName : function() {
      return "recent";
    },
    
    
    // overridden
    _getRenderVariant : function() {
      return "recent";
    },
    
    
    // overridden
    _renderData : function(data)
    {
      alert(data);
      
    }
  }
});<commit_msg>Initial photo list works<commit_after>/* ************************************************************************

  flicky

  Copyright:
    2009 Deutsche Telekom AG, Germany, http://telekom.com

 ************************************************************************ */

/**
 * Start View
 */
qx.Class.define("flicky.view.mobile.Recent", {
  extend : unify.view.mobile.RemoteView,
  type : "singleton",

  members : 
  {
    __content : null,
  

    // overridden
    getTitle : function(type, param) {
      return "Recent";
    },

    
    // overridden
    _createView : function() 
    {
      var layer = new unify.ui.mobile.Layer(this);
      var titlebar = new unify.ui.mobile.TitleBar(this);
      layer.add(titlebar);
      
      var content = this.__content = new unify.ui.mobile.Content;
      content.add("Hello World");
      layer.add(content);

      return layer;
    },
    
    
    // overridden
    _getBusinessObject : function() {
      return flicky.business.Flickr.getInstance();
    },
    
    
    // overridden
    _getServiceName : function() {
      return "recent";
    },
    
    
    // overridden
    _getRenderVariant : function() {
      return "recent";
    },
    
    
    // overridden
    _renderData : function(data)
    {
      var photos = data.query.results.photo;
      var html = [];
      
      for (var i=0, l=photos.length; i<l; i++) {
        html.push(this.__createImage(photos[i]))
      }
      
      this.__content.replace(html.join(""));
      
    },
    
    __createImage : function(entry)
    {
      var tmpl = '<img src="http://farm{$farm}.static.flickr.com/{$server}/{$id}_{$secret}.jpg" alt="{$title}" />';
      
      return tmpl.replace(/{\$([a-z]+)}/g, function(match, key) {
        return entry[key];
      });
    }
  }
});
{'fraction_non_alphanumeric': 0.22254428341384863, 'fraction_numerical': 0.002898550724637681, 'mean_word_length': 2.242171189979123, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '2274101', 'n_tokens_mistral': 980, 'n_tokens_neox': 912, 'n_words': 160}