First commit
This commit is contained in:
commit
c6e2478c40
13918 changed files with 2303184 additions and 0 deletions
|
@ -0,0 +1,40 @@
|
|||
<h2>This is an example of a template you can call inline</h2>
|
||||
<p>If you call it from an <a href='#' id="dialog">ajax call</a>, it's ready to be embedded in your page. </p><p>You can pass an <a href="?id=42">id as param</a> and access it in {ldelim}$id{rdelim}.
|
||||
{if $id}
|
||||
<p><b>Well done, you have an id as param ( {$id} )</b></p>
|
||||
{/if}
|
||||
|
||||
<br>You can also have extra params (?example_param=dummy) and access it in {ldelim}$request.example_param{rdelim}.
|
||||
<br>These are the param I could find :
|
||||
</p>
|
||||
<ul>
|
||||
{foreach from=$request key=k item=p}
|
||||
<li>{ldelim}$request{rdelim}.{$k} = <b>{$p}</b></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
<p>It's done to work with the smarty api, so you can fetch more data, and update or create using the ajax API.</p>
|
||||
<p>
|
||||
|
||||
If load the page directly from your browser, it automatically adds all the page template, including the header with all the jquery plugins. This isn't usual way of calling it, but convenient for debugging purpose.
|
||||
</p>
|
||||
|
||||
<script>
|
||||
{literal}
|
||||
CRM.$(function($) {
|
||||
$("#dialog").click (function () {
|
||||
var $n=$('<div>Loading '+window.location+'</div>').appendTo('body');
|
||||
$n.load(''+window.location, function(){
|
||||
alert ("loaded. might initialise more javascript");
|
||||
});
|
||||
$n.dialog ({modal:true,width:500});
|
||||
return false;
|
||||
});
|
||||
$(".ui-dialog-content #dialog").on ('click', function () { // only triggered on the dialog link in the popup
|
||||
alert ("one level of dialog is enough");
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
{/literal}
|
||||
</script>
|
50
sites/all/modules/civicrm/templates/CRM/Widget/widget.tpl
Normal file
50
sites/all/modules/civicrm/templates/CRM/Widget/widget.tpl
Normal file
|
@ -0,0 +1,50 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>widget</title>
|
||||
</head>
|
||||
<body bgcolor="#ffffff">
|
||||
<!--url's used in the movie-->
|
||||
<!--text used in the movie-->
|
||||
<!--
|
||||
Arguments
|
||||
Actions
|
||||
Result
|
||||
-->
|
||||
|
||||
<!-- saved from url=(0013)about:internet -->
|
||||
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="550" height="400" id="widget" align="middle">
|
||||
<param name="allowScriptAccess" value="sameDomain" />
|
||||
<param name="FlashVars" value="{$flashVars}">
|
||||
<param name="movie" value="widget.swf" />
|
||||
<param name="quality" value="high" />
|
||||
<param name="bgcolor" value="#ffffff" />
|
||||
<embed flashvars="{$flashVars}" src="{$config->resourceBase}extern/Widget/widget.swf" quality="high" bgcolor="#ffffff" width="220" height="220" name="widget" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
|
||||
</object>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue