2 /*********************************************************************************
3 * SugarCRM Community Edition is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
6 * This program is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Affero General Public License version 3 as published by the
8 * Free Software Foundation with the addition of the following permission added
9 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
18 * You should have received a copy of the GNU Affero General Public License along with
19 * this program; if not, see http://www.gnu.org/licenses or write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26 * The interactive user interfaces in modified source and object code versions
27 * of this program must display Appropriate Legal Notices, as required under
28 * Section 5 of the GNU Affero General Public License version 3.
30 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31 * these Appropriate Legal Notices must retain the display of the "Powered by
32 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33 * technical reasons, the Appropriate Legal Notices must display the words
34 * "Powered by SugarCRM".
35 ********************************************************************************/
41 <script type="text/javascript" src='{sugar_getjspath file ='cache/include/javascript/sugar_grp_yui_widgets.js'}'></script>
42 <script type="text/javascript" src='{sugar_getjspath file ='include/javascript/yui/build/paginator/paginator-min.js'}'></script>
44 <style type="text/css">
53 <form enctype="multipart/form-data" name="fontmanager" method="POST" action="index.php" id="fontmanager">
54 <input type="hidden" name="module" value="Configurator">
55 <input type="hidden" name="action" value="FontManager">
56 <input type="hidden" name="action_type" value="">
57 <input type="hidden" name="filename" value="">
58 <input type="hidden" name='return_action' value="{$RETURN_ACTION}">
59 <span class='error'>{$error}</span>
61 <table width="100%" cellpadding="0" cellspacing="0" border="0">
64 <input title="{$MOD.LBL_BACK}" class="button" type="button" name="gobackbutton" value=" {$MOD.LBL_BACK} " id="gobackbutton">
65 <input title="{$MOD.LBL_ADD_FONT}" class="button" type="button" name="addFontbutton" value=" {$MOD.LBL_ADD_FONT} " id="addFontbutton">
71 <div id="YuiListMarkup"></div>
76 <script type="text/javascript">
77 var removeFormatter = function (el, oRecord, oColumn, oData) {
78 if(oRecord._oData.type != "{/literal}{$MOD.LBL_FONT_TYPE_CORE}{literal}" && oRecord._oData.fontpath != "{/literal}{$K_PATH_FONTS}{literal}"){
79 el.innerHTML = '<a href="#" name="deleteButton" onclick="return false;">{sugar_getimage name="delete_inline" ext=".gif" alt=$mod_strings.LBL_DELETE other_attributes='align="absmiddle" border="0" '}{/literal} {$MOD.LBL_REMOVE}{literal}<\/a>';
82 YAHOO.util.Event.onDOMReady(function() {
84 var fontColumnDefs = {$COLUMNDEFS};
85 var fontData = {$DATASOURCE};
87 var fontDataSource = new YAHOO.util.DataSource(fontData);
88 fontDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;
89 fontDataSource.responseSchema = {/literal}{$RESPONSESCHEMA}{literal};
91 paginator: new YAHOO.widget.Paginator({
95 var fontDataTable = new YAHOO.widget.DataTable("YuiListMarkup", fontColumnDefs, fontDataSource, oConfigs);
97 fontDataTable.subscribe("linkClickEvent", function(oArgs){
98 if(oArgs.target.name == "deleteButton"){
99 if(confirm('{/literal}{$MOD.LBL_JS_CONFIRM_DELETE_FONT}{literal}')){
100 document.getElementById("fontmanager").action.value = "deleteFont";
101 document.getElementById("fontmanager").filename.value = this.getRecord(oArgs.target)._oData.filename;
102 document.getElementById("fontmanager").submit();
107 document.getElementById('gobackbutton').onclick=function(){
108 if(document.getElementById("fontmanager").return_action.value != ""){
109 document.location.href='index.php?module=Configurator&action=' + document.getElementById("fontmanager").return_action.value;
111 document.location.href='index.php?module=Configurator&action=SugarpdfSettings';
114 document.getElementById('addFontbutton').onclick=function(){
115 document.location.href='index.php?module=Configurator&action=addFontView';