modules/org.openbravo.client.widgets/web/org.openbravo.client.widgets/twitter.html
author RM packaging bot <staff.rm@openbravo.com>
Mon, 09 Jul 2012 07:51:46 +0000
changeset 17429 f018e25f3cba
parent 17424 18ea1e10d7d7
child 17430 caac0a361f3e
permissions -rw-r--r--
Merge temporary head for 3.0MP12.1
asier@10719
     1
<!--
asier@10719
     2
 *************************************************************************
asier@10719
     3
 * The contents of this file are subject to the Openbravo  Public  License
asier@10719
     4
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
asier@10719
     5
 * Version 1.1  with a permitted attribution clause; you may not  use this
asier@10719
     6
 * file except in compliance with the License. You  may  obtain  a copy of
asier@10719
     7
 * the License at http://www.openbravo.com/legal/license.html
asier@10719
     8
 * Software distributed under the License  is  distributed  on  an "AS IS"
asier@10719
     9
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
asier@10719
    10
 * License for the specific  language  governing  rights  and  limitations
asier@10719
    11
 * under the License.
asier@10719
    12
 * The Original Code is Openbravo ERP.
asier@10719
    13
 * The Initial Developer of the Original Code is Openbravo SLU
asier@10719
    14
 * All portions are Copyright (C) 2011 Openbravo SLU
asier@10719
    15
 * All Rights Reserved.
asier@10719
    16
 * Contributor(s):  ______________________________________.
asier@10719
    17
 ************************************************************************
asier@10719
    18
-->
asier@10719
    19
<html>
asier@10719
    20
<body>
staff@17429
    21
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
asier@10719
    22
<script>
asier@10719
    23
(function() {
asier@10719
    24
asier@10719
    25
  function getUrlVars() {
asier@10719
    26
    var vars = [], hash, href= window.location.href,
asier@10719
    27
        hashes = href.slice(href.indexOf('?') + 1).split('&');
asier@10719
    28
asier@10719
    29
    for(var i = 0; i < hashes.length; i++) {
asier@10719
    30
      hash = hashes[i].split('=');
asier@10719
    31
	  vars.push(hash[0]);
asier@10719
    32
	  vars[hash[0]] = hash[1];
asier@10719
    33
    }
asier@10719
    34
asier@10719
    35
    return vars;
asier@10719
    36
  }
asier@10719
    37
asier@10719
    38
var vars = getUrlVars(),
asier@10719
    39
    u = vars['u'] || 'Openbravo',
asier@10719
    40
    s = vars['s'] || 'Openbravo',
asier@10719
    41
    t = vars['t'] || 'profile',
asier@10719
    42
    theme = {
asier@10719
    43
        shell: {
asier@10719
    44
          background: '#dfdfdf',
asier@10719
    45
          color: '#000000'
asier@10719
    46
        },
asier@10719
    47
        tweets: {
asier@10719
    48
          background: '#58A618',
asier@10719
    49
          color: '#ffffff',
asier@10719
    50
          links: '#fff133'
asier@10719
    51
        }
asier@10719
    52
      };
asier@10719
    53
asier@10719
    54
if(t === 'profile') {
asier@10719
    55
  new TWTR.Widget({
asier@10719
    56
    version: 2,
asier@10719
    57
    type: t,
asier@10719
    58
    rpp: 4,
asier@10719
    59
    interval: 6000,
asier@10719
    60
    width: 'auto',
asier@10719
    61
    height: 160,
asier@10719
    62
    theme: theme,
asier@10719
    63
    features: {
asier@10719
    64
      scrollbar: false,
asier@10719
    65
      fullscreen: false,
asier@10719
    66
      loop: true,
asier@10719
    67
      live: true,
asier@10719
    68
      hashtags: true,
asier@10719
    69
      timestamp: true,
asier@10719
    70
      avatars: false,
asier@10719
    71
      behavior: 'all'
asier@10719
    72
    }
asier@10719
    73
  }).render().setUser(u).start();
asier@10719
    74
  return;
asier@10719
    75
}
asier@10719
    76
new TWTR.Widget({
asier@10719
    77
  version: 2,
asier@10719
    78
  type: 'search',
asier@10719
    79
  search: s,
asier@10719
    80
  interval: 6000,
asier@10719
    81
  title: '',
asier@10719
    82
  subject: 'Tweets including "' + s + '"',
asier@10719
    83
  width: 'auto',
asier@10719
    84
  height: 200,
asier@10719
    85
  theme: theme,
asier@10719
    86
  features: {
asier@10719
    87
    scrollbar: false,
asier@10719
    88
	loop: true,
asier@10719
    89
	live: true,
asier@10719
    90
	hashtags: true,
asier@10719
    91
	timestamp: true,
asier@10719
    92
	avatars: true,
asier@10719
    93
	toptweets: true,
asier@10719
    94
	behavior: 'default'
asier@10719
    95
  }
asier@10719
    96
}).render().start();
asier@10719
    97
}())
asier@10719
    98
</script>
asier@10719
    99
</body>
asier@10719
   100
</html>