7.1
Table Of Contents
- Table of Content
- Overview
- Understanding PrintShop Mail Web
- Getting Started
- The PrintShop Mail Web Interface
- Publishing Workflow
- Ordering Workflow
- New Document
- Order Manager
- Checkout
- Companies
- Users
- Publication Types
- Collections
- Settings
- About
- License
- Roles
- Languages
- Web Design
- Maintenance
- Settings
- Currencies
- Tax Rates
- Shipping Rates
- Calendar
- Production Settings
- User Input Field Defaults
- Output Folders
- Job options
- Printers
- E-mail Settings
- E-mail Addressees
- Managing E-mail Templates
- Modules Settings
- Enabling a MIS connector
- Installed modules
- Properties
- Enabling a Print Production connector
- Installed modules
- Properties
- Requirements
- Configuring the module
- The PayPal Sandbox
- Processing orders
- Requirements
- Configuring the Authorize.net module
- Test mode
- AVS and CCV checks
- Payment page
- Requirements
- Requesting a test account
- Configuring the iDEAL test dashboard
- Configuring the iDeal module
- Requirements
- Configuring the Moneris module
- Test mode
- Requesting a live account
- AVS and CVD checks
- Payment page
- Add a new Module
- Configure a module
- Delete a Module
- XML (eXtensible Markup Language)
- Options
- Sample POST receive script
- Interaction With PrintShop Mail Design
- Introduction to Regular Expressions
- Introduction
- Skinning Guide
- Getting started
- Creating your own skin
- The template file
- HMTL Outline
- Styling
- Key Concepts
- Style organization
- Header
- User information
- Menu bar
- Background
- Overview tables
- Edit forms
- Sub menus
- Special variables
- Variables for template files
- Variables for style files
- Creating page exceptions
- Creating a page specific template file
- Modifying a page specific template file
- DOM manipulation using jQuery
- Launching code on Document Ready
- Populating fields with computed values
- Removing elements from the DOM
- Adding information to the DOM
- Customizing the store front
- Storefront class
- Creating a hierarchical tree
- Adding a live search option
- Copyright Information
- Index
});
function getTree(){
var searchfor = $('#searchfor').val();
$('#searchfor').css({backgroundPosition: '100% -18px'})
$.ajax({
type: "GET",
url: "templates/default/storefront_tree_livesearch/livesearch.php",
data: "searchfor=" + searchfor,
success: function(msg){
$('#searchfor').css({backgroundPosition: '100% 2px'})
$("#tree").html(msg);
generateTree();
}
});
}
function generateTree(){
$("#tree ul").treeview({
collapsed: true
});
}
$(document).ready
This code is executed when the browser is finished loading the web page. It executes the getTree() and generateTree() func-
tion. This section makes sure that the full list is retrieved when the store front page is invoked (New Document).
getTree()
This function executes every time a character is entered in the input field. It retrieves the text from the search field and sends
the contents to the livesearch.php file on the server. The HTML code returned by the livesearch.php file is used to update a
placeholder element on the page (<div id="tree">).
generateTree()
Once the tree information is loaded in to the DOM the generateTree() function is called to apply the final tree view and tree
functionality.
The template file
In the content area of the template file (template-storefront_overview.php) an input field is added. The getTree() function is
added to the onkeyup event of the <input> field. This event is triggered when the user presses, and releases a key in the
input field.
<div id="content">
<div style="border:1px solid silver;width:250px;margin-bottom:0.5em;">
<div id="cSearchHeader">Search</div>
<div style="padding: 4px;">
<p><b>Pub type or document name:</b></p>
<input style="
©2010 Objectif Lune Inc - 261 -