Skip to content
Snippets Groups Projects
Commit ef3309b6 authored by colemanw's avatar colemanw
Browse files

Remove scripts.tpl and references to it CRM-12339

parent 16fff44f
No related branches found
No related tags found
No related merge requests found
......@@ -763,8 +763,8 @@ CRM.validate = CRM.validate || {
});
}
$(document).ready(function() {
if (CRM && CRM.config && CRM.config.urlIsPublic === false) {
$(function() {
if ($('#crm-notification-container').length) {
// Initialize notifications
$('#crm-notification-container').notify();
messagesFromMarkup.call($('#crm-container'));
......
......@@ -10,7 +10,6 @@
h2.entity {cursor:pointer}
{/literal}
</style>
{include file="CRM/common/scripts.tpl"}
<script>
if (!jQuery) {ldelim}
var head= document.getElementsByTagName('head')[0];
......
......@@ -56,14 +56,13 @@ cj(function($) {
// use civicrm notifications when there are errors
params.invalidHandler = function(form, validator) {
var errors = validator.errorList;
if (CRM && CRM.config && CRM.config.urlIsPublic === false) {
{/literal}{if !$urlIsPublic}{literal}
for (var i in errors) {
$(errors[i].element).crmError(errors[i].message);
}
}
else {
alert({/literal}"{ts escape='js'}Please review and correct the highlighted fields before continuing.{/ts}"{literal});
}
{/literal}{else}
alert("{ts escape='js'}Please review and correct the highlighted fields before continuing.{/ts}");
{/if}{literal}
};
CRM.validate.params = CRM.validate.params || {};
......
......@@ -70,9 +70,8 @@ cj(function( ) {
minChars: 1,
matchContains: true,
delay: 400,
max: CRM.config.search_autocomplete_count,
max: {/literal}{crmSetting name="search_autocomplete_count" group="Search Preferences"}{literal},
extraParams:{
limit: CRM.config.search_autocomplete_count,
fieldName:function () {
return cj('input[name=quickSearchField]:checked').val();
},
......
......@@ -23,7 +23,6 @@
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
{include file="CRM/common/scripts.tpl"}
{if $config->debug}
{include file="CRM/common/debug.tpl"}
{/if}
......
......@@ -23,7 +23,6 @@
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
{include file="CRM/common/scripts.tpl"}
{if $config->debug}
{include file="CRM/common/debug.tpl"}
{/if}
......
......@@ -23,7 +23,6 @@
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
{include file="CRM/common/scripts.tpl"}
{if $config->debug}
{include file="CRM/common/debug.tpl"}
{/if}
......
......@@ -35,7 +35,6 @@
</head>
<body>
{include file="CRM/common/scripts.tpl"}
{if $config->debug}
{include file="CRM/common/debug.tpl"}
{/if}
......
{*
+--------------------------------------------------------------------+
| CiviCRM version 4.3 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2013 |
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<script type="text/javascript">
{*/*
* Here we define the CRM object,
* A single global variable to hold everything that needs to be accessed from the global scope
* Translated strings are stored in the CRM.strings object, and can be accessed via ts() in javascript
* Very common strings are included here for convenience. Others should be added dynamically per-page.
*
* To extend this object from php:
* CRM_Core_Resources::singleton()->addSetting(array('myNamespace' => array('foo' => 'bar')));
* It can then be accessed client-side via CRM.myNamespace.foo
*/
*}
{literal}
var CRM = CRM || {};
CRM = cj.extend(true, {
strings: {},
config: {{/literal}
urlIsPublic: {if $urlIsPublic}true{else}false{/if},
search_autocomplete_count: {crmSetting name="search_autocomplete_count" group="Search Preferences"}
{literal}},
}, CRM);
{/literal}
</script>
......@@ -23,7 +23,6 @@
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
{include file="CRM/common/scripts.tpl"}
{if $config->debug}
{include file="CRM/common/debug.tpl"}
{/if}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment