Skip to content
Browse files

Move ExtJS resource loads out of components and into pages; don't use…

… debug versions
  • Loading branch information...
1 parent ac8bddf commit 661ffcb8bea32c6def013e0992d5821fbace24d7 @jefftrull committed Apr 30, 2012
View
8 components/Campaign_Select_Menu.component
@@ -19,14 +19,6 @@ Copyright 2011 Jeff Trull <jetrull@sbcglobal.net>
<apex:attribute name="allowinactiveselect" type="Boolean" description="Whether to permit users to select inactive Campaigns" default="false"/>
<apex:attribute name="fn" type="String" description="name of a Javascript function to call with ID once a Campaign is selected." required="true"/>
- <!-- load ExtJS -->
- <apex:stylesheet value="{!$Resource.ExtJS}/ext-3.4.0/resources/css/ext-all.css" />
- <apex:includeScript value="{!$Resource.ExtJS}/ext-3.4.0/adapter/ext/ext-base.js"/>
- <apex:includeScript value="{!$Resource.ExtJS}/ext-3.4.0/ext-all.js"/>
- <script type="text/javascript">
- Ext.BLANK_IMAGE_URL="{!$Resource.ExtJS}/resources/images/default/s.gif"
- </script>
-
<!-- Style to better mimic the look of the Campaign tab -->
<style type="text/css">
.x-tree-root-ct { background-color: #F3F3EC }
View
8 components/Campaign_Select_Tree.component
@@ -19,14 +19,6 @@ Copyright 2011 Jeff Trull <jetrull@sbcglobal.net>
<apex:attribute name="allowinactiveselect" type="Boolean" description="Whether to permit users to select inactive Campaigns" default="false"/>
<apex:attribute name="fn" type="String" description="name of a Javascript function to call with ID once a Campaign is selected." required="true"/>
- <!-- load ExtJS -->
- <apex:stylesheet value="{!$Resource.ExtJS}/ext-3.4.0/resources/css/ext-all.css" />
- <apex:includeScript value="{!$Resource.ExtJS}/ext-3.4.0/adapter/ext/ext-base.js"/>
- <apex:includeScript value="{!$Resource.ExtJS}/ext-3.4.0/ext-all.js"/>
- <script type="text/javascript">
- Ext.BLANK_IMAGE_URL="{!$Resource.ExtJS}/ext-3.4.0/resources/images/default/s.gif"
- </script>
-
<script type="text/javascript">
Ext.onReady(function(){
var allowinactive = ("{!allowinactiveselect}" == "true");
View
7 components/ExtJS4_Data_Grid_with_JSR.component
@@ -21,12 +21,7 @@ Copyright 2011 Jeff Trull <jetrull@sbcglobal.net>
<apex:attribute name="minimized" type="Boolean" description="whether to initially render the grid in minimized state" default="false"/>
<apex:attribute name="rows" type="int" description="how many rows to display in grid" default="19"/>
- <!-- load ExtJS -->
- <apex:stylesheet value="{!$Resource.ExtJS4}/ext-4.0.7-gpl/resources/css/ext-all.css" />
- <apex:includeScript value="{!$Resource.ExtJS4}/ext-4.0.7-gpl/ext-all-debug.js"/>
- <script type="text/javascript">
- Ext.BLANK_IMAGE_URL="{!$Resource.ExtJS4}/ext-4.0.7-gpl/resources/themes/images/default/tree/s.gif"
- </script>
+ <!-- Assumes using page loaded ExtJS already -->
<!-- Icons. Using those included with ExtJS. -->
<style type="text/css">
View
7 components/Hierarchy_Editor.component
@@ -19,13 +19,6 @@ Copyright 2011 Jeff Trull <jetrull@sbcglobal.net>
<apex:attribute name="object" type="Object" description="sObject to edit hierarchy on" default="Campaign"/>
<apex:attribute name="fn" type="String" description="name of a Javascript function to call with ID once a Campaign is selected." required="false" default=""/>
- <!-- load ExtJS -->
- <apex:stylesheet value="{!$Resource.ExtJS4}/ext-4.0.7-gpl/resources/css/ext-all.css" />
- <apex:includeScript value="{!$Resource.ExtJS4}/ext-4.0.7-gpl/ext-all-debug.js"/>
- <script type="text/javascript">
- Ext.BLANK_IMAGE_URL="{!$Resource.ExtJS4}/ext-4.0.7-gpl/resources/themes/images/default/tree/s.gif"
- </script>
-
<script type="text/javascript">
Ext.onReady(function() {
// BUG WORKAROUND
View
9 pages/CHMenu_Test.page
@@ -15,6 +15,15 @@ Copyright 2011 Jeff Trull <jetrull@sbcglobal.net>
-->
<apex:page standardController="Opportunity">
<!-- A page to test using the campaign menu and campaign tree components -->
+
+ <!-- load ExtJS -->
+ <apex:stylesheet value="{!$Resource.ExtJS}/ext-3.4.0/resources/css/ext-all.css" />
+ <apex:includeScript value="{!$Resource.ExtJS}/ext-3.4.0/adapter/ext/ext-base.js"/>
+ <apex:includeScript value="{!$Resource.ExtJS}/ext-3.4.0/ext-all.js"/>
+ <script type="text/javascript">
+ Ext.BLANK_IMAGE_URL="{!$Resource.ExtJS}/ext-3.4.0/resources/images/default/s.gif"
+ </script>
+
<apex:form >
<apex:pageBlock title="Selecting Campaigns via Menu Tree" tabStyle="Campaign">
<c:Campaign_Select_Menu fn="rerender_detail"/>
View
8 pages/Campaign_Hierarchy_Editor.page
@@ -16,6 +16,14 @@ Copyright 2011 Jeff Trull <jetrull@sbcglobal.net>
<apex:page standardController="Campaign">
<!-- Campaign hierarchy editor using custom VF component based on ExtJS TreePanel widget -->
<!-- by Jeff Trull <jetrull@sbcglobal.net> 2010-12-03 -->
+
+ <!-- load ExtJS -->
+ <apex:stylesheet value="{!$Resource.ExtJS4}/ext-4.0.7-gpl/resources/css/ext-all.css" />
+ <apex:includeScript value="{!$Resource.ExtJS4}/ext-4.0.7-gpl/ext-all.js"/>
+ <script type="text/javascript">
+ Ext.BLANK_IMAGE_URL="{!$Resource.ExtJS4}/ext-4.0.7-gpl/resources/themes/images/default/tree/s.gif"
+ </script>
+
<apex:form >
<apex:pageBlock title="Campaign Hierarchy Editor" tabStyle="Campaign">
<c:Hierarchy_Editor object="Campaign" fn="rerender_detail"/>
View
7 pages/Grid_Component_Test.page
@@ -1,5 +1,12 @@
<!-- Example usage of grid component -->
<apex:page >
+ <!-- load ExtJS -->
+ <apex:stylesheet value="{!$Resource.ExtJS4}/ext-4.0.7-gpl/resources/css/ext-all.css" />
+ <apex:includeScript value="{!$Resource.ExtJS4}/ext-4.0.7-gpl/ext-all.js"/>
+ <script type="text/javascript">
+ Ext.BLANK_IMAGE_URL="{!$Resource.ExtJS4}/ext-4.0.7-gpl/resources/themes/images/default/tree/s.gif"
+ </script>
+
<!-- Note REST version of component seems to have some problem with >1 on a page... not yet diagnosed -->
<c:ExtJS4_Data_Grid_with_JSR object="Contact" fields="Id,FirstName,LastName,Birthdate,Email,Level__c" rows="18" minimized="true"/>
<c:ExtJS4_Data_Grid_with_JSR object="Account" fields="Name,CreatedDate,Type" rows="18" minimized="true"/>

0 comments on commit 661ffcb

Please sign in to comment.
Something went wrong with that request. Please try again.