This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Your installation or use of this SugarCRM file is subject to the applicable | |
* terms available at | |
* http://support.sugarcrm.com/06_Customer_Center/10_Master_Subscription_Agreements/. | |
* If you do not agree to all of the applicable terms or do not have the | |
* authority to bind the entity as an authorized representative, then do not | |
* install or use this SugarCRM file. | |
* | |
* Copyright (C) SugarCRM Inc. All rights reserved. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// http://support.sugarcrm.com/02_Documentation/04_Sugar_Developer/Sugar_Developer_Guide_7.2/70_API/Web_Services/20_Examples/v10/module_filter_GET/ | |
$base_url = "https://{instance url}/rest/v10"; | |
$username = "admin"; | |
$password = "****"; | |
/** | |
* Generic function to make cURL request. | |
* @param $url - The URL route to use. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); | |
class WorldCup14Api extends SugarApi | |
{ | |
public function registerApiRest() | |
{ | |
return array( | |
'GetScoresEndpoint' => array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$manifest = array ( | |
'acceptable_sugar_versions' => | |
array( | |
'regex_matches' => array( | |
'7\\.[0-9]\\.[0-9]$' | |
), | |
), | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$app_strings['LBL_DASHLET_WORLDCUP14'] = 'Football World Cup 2014'; | |
$app_strings['LBL_DASHLET_WC14_DESC'] = 'Football World Cup results per day or team'; | |
$app_strings['LBL_DASHLET_WC14_TODAYTEAM'] = 'What do you want to see?'; | |
$app_strings['LBL_DASHLET_WC14_FAVTEAM'] = 'My Favorite team is'; | |
$app_strings['LBL_DASHLET_WC14_LOCALTIME'] = 'locale time'; | |
$app_list_strings['DASHLET_WC14_list']=array ( | |
'today' => 'Today\'s matches live scores', | |
'team' => 'See my favorite team\'s scores', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
plugins: ['Dashlet'], | |
initDashlet: function () { | |
if (this.meta.config) { | |
var team = this.settings.get("team") || "FRA"; | |
this.settings.set("team", team); | |
var todayorteam = this.settings.get("todayorteam") || "team"; | |
this.settings.set("todayorteam", todayorteam); | |
} | |
//this.model.on("change:name", this.loadData, this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(!defined('sugarEntry'))define('sugarEntry', true); | |
$viewdefs['base']['view']['worldcup14'] = array( | |
'dashlets' => array( | |
array( | |
'label' => 'LBL_DASHLET_WORLDCUP14', | |
'description' => 'LBL_DASHLET_WC14_DESC', | |
'config' => array( | |
'todayorteam' => '-1', | |
'team' => '14', |