-
Notifications
You must be signed in to change notification settings - Fork 6
/
oppProductQuickAdd.page
54 lines (50 loc) · 2.9 KB
/
oppProductQuickAdd.page
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<apex:page showHeader="true" sidebar="true" standardController="Opportunity" extensions="oppProductQuickAdd">
<link href="{!URLFOR($Resource.jsplugins, 'bootstrap/css/bootstrap_namespaced.css')}" rel="stylesheet" type="text/css" />
<link href="{!URLFOR($Resource.oppProductQuickAdd_css)}" rel="stylesheet" type="text/css" />
<apex:includeScript value="{!URLFOR($Resource.jsplugins, 'jquery-1.9.1.min.js')}" />
<apex:includeScript value="{!URLFOR($Resource.jsplugins, 'bootstrap/js/bootstrap.min.js')}" />
<apex:includeScript value="{!URLFOR($Resource.jsplugins, 'handlebars.1.0.0-rc3.js')}" />
<apex:includeScript value="{!URLFOR($Resource.jsplugins, 'accounting.js')}" />
<apex:includeScript value="{!URLFOR($Resource.oppProductQuickAdd_js)}" />
<script type="text/javascript">
//Pull down a serialized json string from the controller extension
var productInfo=JSON.parse("{!JSENCODE(productInfo)}");
var currentOppId="{!JSENCODE(Opportunity.Id)}";
//var currentOppId="006i0000002KWdj";
</script>
<!-- Container for our namespaced version of bootstrap -->
<div class="twitter-bs">
<div class="row-fluid">
<!-- The table we are going to display our data in. Tables aren't hip, but hey if it's tabular data, why not! -->
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="quickoppproduct">
<thead>
<tr class=""><td class="span6">Product Name</td><td class="span2">Quantity</td><td class="span4">Total</td></tr>
</thead>
<tbody>
<tr class="bottom-controls"><td colspan="3" class="span12"><i class="add-new-line-item icon-plus"></i></td></tr>
</tbody>
</table>
</div>
</div>
<!-- Handlebars template for table rows -->
<script id="lineItemTemplate" type="text/x-handlebars-template">
<tr class="lineitem">
<td class="span6">
<input autocomplete="off" class="lineitem-product-name" type="text" placeholder="Product Name" data-provide="typeahead" data-items="4"
{{#if productName}}value="{{productName}}"{{/if}}
{{#if lineItemId}}lineitemid="{{lineItemId}}"{{/if}}
{{#if priceBookId}}pricebookid="{{priceBookId}}"{{/if}}
></input>
</td>
<td class="span2">
<input class="lineitem-product-qty" type="number" placeholder="Quantity" {{#if quantity}}value="{{quantity}}" {{else}} value=1 {{/if}}></input>
</td>
<td class="span3">
<input class="lineitem-opp-price" type="number" value="0.00" disabled="disabled"></input>
</td>
<td class="span1">
<i class="remove-line-item icon-remove-sign"></i>
</td>
</tr>
</script>
</apex:page>