本文整理汇总了PHP中module_config::register_js方法的典型用法代码示例。如果您正苦于以下问题:PHP module_config::register_js方法的具体用法?PHP module_config::register_js怎么用?PHP module_config::register_js使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类module_config
的用法示例。
在下文中一共展示了module_config::register_js方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
function init()
{
$this->version = 2.255;
// 2.255 - 2015-06-07 - link to settings
// 2.254 - 2015-04-12 - minor bug fix
// 2.253 - 2015-03-08 - wysiwyg and dropdown/select extra fields
// 2.252 - 2015-03-08 - wysiwyg and dropdown/select extra fields
// 2.251 - 2015-02-05 - text/check extra field types
// 2.25 - 2015-01-28 - sorting by extra fields
// 2.249 - 2014-12-22 - extra field dates/delete/list/rename fixes
// 2.248 - 2014-10-03 - hook_filter_var for better theme support
// 2.247 - 2014-08-02 - responsive fixes
// 2.16 - fix to disable editing when page isn't editable. this caused double ups on extra keys in table listings.
// 2.17 - hooks for the encryption module to take over.
// 2.18 - bug fix with new extra field types.
// 2.19 - better saving of extra fields etc.. in sync with member external signup extra field feature
// 2.2 - started work on sorting extra fields
// 2.21 - bug fix
// 2.22 - see Settings-Extra Fields for new options.
// 2.23 - Extra bug fix
// 2.24 - permission improvement
// 2.241 - clickable links in extra fields
// 2.242 - clickable links in extra fields
// 2.243 - new delete button in Settings > Extra Fields
// 2.244 - 2013-11-15 - working on new UI
// 2.245 - 2013-12-19 - extra fields now available when creating a job
// 2.246 - 2014-01-23 - searching by extra fields
$this->links = array();
$this->module_name = "extra";
$this->module_position = 8882;
module_config::register_css('extra', 'extra.css');
module_config::register_js('extra', 'extra.js');
}
示例2: init
public function init()
{
$this->module_name = "encrypt";
$this->module_position = 1;
$this->version = 2.269;
// 2.2 - initial release
// 2.21 - better support for new 'extra' fields
// 2.22 - permissions.
// 2.221 - typo.
// 2.23 - a better "e" value in RSA to support easier server side public key encryption.
// 2.24 - sidebar encryption in ticket extra fields.
// 2.25 - link fix, no htmlspecialchars
// 2.26 - save decrypted
// 2.261 - remove console .log
// 2.262 - fix for encrypted ticket submission + attachments
// 2.263 - larger popup
// 2.264 - 2013-04-07 - fix for special characters in encryption
// 2.265 - 2013-11-23 - working on new ui
// 2.266 - 2014-01-17 - compatibility update for custom data plugin
// 2.267 - 2014-01-21 - updated js encryption library
// 2.268 - 2014-10-13 - hook_filter_var for better theme support
// 2.269 - 2015-04-12 - fix dollar sign in extra field bug
module_config::register_js('encrypt', 'sjcl.js');
module_config::register_js('encrypt', 'encrypt.js');
module_config::register_css('encrypt', 'encrypt.css');
hook_add('extra_fields_output', 'module_encrypt::extra_fields_output_callback');
}
示例3: init
public function init()
{
$this->module_name = "form";
$this->module_position = 0;
module_config::register_css('form', 'jquery.timepicker.css');
module_config::register_js('form', 'jquery.timepicker.min.js');
hook_add('header_print_js', 'module_form::hook_header_print_js');
}
示例4: init
public function init()
{
$this->links = array();
$this->module_name = "backup";
$this->module_position = 30;
module_config::register_js('backup', 'backup.js');
module_config::register_css('backup', 'backup.css');
}
示例5: init
public function init()
{
$this->module_name = "timer";
$this->module_position = 0;
if (module_security::is_logged_in() && module_config::c('timer_enabled', 1) && self::can_i('view', 'Task Timer') && get_display_mode() != 'mobile') {
module_config::register_css('timer', 'timer.css');
module_config::register_js('timer', 'timer.js');
hook_add('job_task_after', 'module_timer::hook_job_task_after');
hook_add('header_print_js', 'module_timer::hook_header_print_js');
}
}
示例6: init
function init()
{
$this->links = array();
$this->module_name = "job_discussion";
$this->module_position = 17.1;
//17 is job
$this->version = 2.149;
// 2.1 - initial
// 2.11 - date change
// 2.12 - better linking and auto open
// 2.13 - possible bug fix in discussion saving
// 2.14 - bug fixing.
// 2.141 - bug fix for IE.
// 2.142 - send email to staff option (as well as customer)
// 2.143 - 2013-07-29 - new _UCM_SECRET hash in config.php
// 2.144 - 2013-12-06 - javascript for for new jquery
// 2.145 - 2014-03-17 - make discussion button stand out a bit more ( job_discussion_button_label )
// 2.146 - 2014-03-18 - fix for disabling job discussion plugin
// 2.147 - 2014-05-27 - email discussions to multiple customer contacts
// 2.148 - 2015-01-08 - AdminLTE modal popup discussions (thanks 3wCorner!)
// 2.149 - 2015-01-10 - job discussion bug fix
if (self::is_plugin_enabled()) {
module_config::register_css('job_discussion', 'job_discussion.css');
module_config::register_js('job_discussion', 'job_discussion.js');
//if(self::can_i('view','Job Discussions')){
if (get_display_mode() != 'mobile') {
hook_add('job_task_after', 'module_job_discussion::hook_job_task_after');
}
}
if (class_exists('module_template', false)) {
module_template::init_template('job_discussion_email_customer', 'Dear {CUSTOMER_NAME},<br>
<br>
A new comment has been added to a task in your job: {JOB_NAME}.<br><br>
Task: {TASK_NAME} <br/><br/>
Note: {NOTE}<br/><br/>
You can view this job and the comments online by <a href="{JOB_URL}">clicking here</a>.<br><br>
Thank you,<br><br>
{FROM_NAME}
', 'New Job Comment: {JOB_NAME}', array('CUSTOMER_NAME' => 'Customers Name', 'JOB_NAME' => 'Job Name', 'FROM_NAME' => 'Your name', 'JOB_URL' => 'Link to job for customer', 'TASK_NAME' => 'name of the task the note was added to', 'NOTE' => 'Copy of the note'));
module_template::init_template('job_discussion_email_staff', 'Dear {STAFF_NAME},<br>
<br>
A new comment has been added to a task in your job: {JOB_NAME}.<br><br>
Task: {TASK_NAME} <br/><br/>
Note: {NOTE}<br/><br/>
You can view this job and the comments online by <a href="{JOB_URL}">clicking here</a>.<br><br>
Thank you,<br><br>
{FROM_NAME}
', 'New Comment on your Job: {JOB_NAME}', array('STAFF_NAME' => 'Staff Name', 'JOB_NAME' => 'Job Name', 'FROM_NAME' => 'Your name', 'JOB_URL' => 'Link to job for staff member', 'TASK_NAME' => 'name of the task the note was added to', 'NOTE' => 'Copy of the note'));
}
}
示例7: init
function init()
{
$this->links = array();
$this->module_name = "social";
$this->module_position = 25.1;
$this->version = 2.131;
// 2.131 - 2014-08-04 - responsive improvements
// 2.13 - 2014-05-23 - social fixes
// 2.12 - 2014-04-05 - ability to disable social plugin
// 2.11 - 2014-04-05 - better message archiving
// 2.1 - 2014-03-25 - initial release
if (self::is_plugin_enabled()) {
module_config::register_css('social', 'social.css', true, 5);
module_config::register_js('social', 'social.js', true, 5);
}
}
示例8: init
function init()
{
$this->links = array();
$this->module_name = "social_twitter";
$this->module_position = 25.2;
$this->version = 2.131;
// 2.131 - 2014-08-04 - responsive im
// 2.13 - 2014-05-23 - social fixes
// 2.12 - 2014-04-05 - ability to disable social plugin
// 2.11 - 2014-04-05 - better message archiving
// 2.1 - 2014-04-05 - initial release
if (module_social::is_plugin_enabled() && self::is_plugin_enabled()) {
module_config::register_js('social_twitter', 'social_twitter.js');
module_config::register_css('social_twitter', 'social_twitter.css');
}
//hook_add('get_social_methods','module_social_twitter::hook_get_social_methods');
}
示例9: init
function init()
{
$this->links = array();
$this->module_name = "social_facebook";
$this->module_position = 25.2;
$this->version = 2.132;
// 2.132 - 2014-10-13 - support for local FB app/api
// 2.131 - 2014-08-04 - responsive improvements
// 2.13 - 2014-05-23 - social fixes
// 2.12 - 2014-04-05 - ability to disable social plugin
// 2.11 - 2014-04-05 - better message archiving
// 2.1 - 2014-04-05 - initial release
if (module_social::is_plugin_enabled() && self::is_plugin_enabled()) {
module_config::register_js('social_facebook', 'social_facebook.js');
module_config::register_css('social_facebook', 'social_facebook.css');
}
//hook_add('get_social_methods','module_social_facebook::hook_get_social_methods');
}
示例10: init
public function init()
{
$this->links = array();
$this->help_types = array();
$this->module_name = "help";
$this->module_position = 16;
$this->version = 2.11;
//2.11 - 2014-04-05 - url help js
//2.1 - 2014-03-14 - initial release of new help system
if (module_help::is_plugin_enabled() && (module_config::c('help_only_for_admin', 1) && module_security::get_loggedin_id() == 1 || !module_config::c('help_only_for_admin', 1) && module_help::can_i('view', 'Help'))) {
// hook for help icon in top bar
hook_add('header_buttons', 'module_help::hook_filter_var_header_buttons');
hook_add('header_print_js', 'module_help::header_print_js');
module_config::register_js('help', 'help.js');
if (module_config::can_i('view', 'Settings')) {
$this->links[] = array("name" => "Help", "p" => "help_settings", 'holder_module' => 'config', 'holder_module_page' => 'config_admin', 'menu_include_parent' => 0);
}
}
}
示例11: init
public function init()
{
$this->module_name = "pin";
$this->module_position = 0;
module_config::register_css('pin', 'pin.css');
module_config::register_js('pin', 'pin.js');
$this->version = 2.11;
//2.11 css tweak
if (isset($_REQUEST['pin_process']) && module_security::is_logged_in() && module_pin::can_i('edit', 'Header Pin')) {
switch ($_REQUEST['pin_process']) {
case 'pin_save':
switch ($_REQUEST['pin_action']) {
case 'modify':
if ($_REQUEST['pin_id'] && $_REQUEST['current_title']) {
$this->update_pin($_REQUEST['pin_id'], false, $_REQUEST['current_title']);
set_message('Pin modified successfully');
redirect_browser($_REQUEST['current_url']);
}
break;
case 'delete':
if ($_REQUEST['pin_id']) {
$this->delete_pin($_REQUEST['pin_id']);
set_message('Pin deleted successfully');
redirect_browser($_REQUEST['current_url']);
}
break;
case 'add':
if ($_REQUEST['current_url'] && $_REQUEST['current_title']) {
$pin_id = $this->add_pin($_REQUEST['current_url'], $_REQUEST['current_title']);
if ($pin_id) {
set_message('Pin added successfully');
} else {
set_message('Pin already exists');
}
redirect_browser($_REQUEST['current_url']);
}
break;
}
break;
}
}
}
示例12: init
public function init()
{
$this->links = array();
$this->user_types = array();
$this->module_name = "data";
$this->module_position = 18;
$this->version = 2.163;
//2.163 - 2015-10-27 - new hook locations in jobs
//2.162 - 2015-10-16 - customer link in view all
//2.161 - 2015-08-15 - email replace fields fix
//2.16 - 2015-03-18 - fulltext db fix
//2.159 - 2015-03-17 - db speed improvements
//2.158 - 2015-03-05 - untick multiple option bug fix
//2.157 - 2015-02-05 - custom data search spacing fix
//2.156 - 2015-01-31 - search by created/update
//2.155 - 2015-01-27 - file download name/extension fix
//2.154 - 2015-01-25 - fixes, pdf template and single entry
//2.153 - 2015-01-21 - link to customer and multiple fields
//2.1 - 2014-01-05 - awesome custom data feature - initial release
//2.11 - 2014-01-05 - awesome custom data feature - menu fix
//2.12 - 2014-01-08 - custom data update - better delete options
//2.13 - 2014-01-14 - custom data update - sub lists support
//2.14 - 2014-01-17 - encrypted field support
//2.141 - 2014-02-03 - icons in menu
//2.142 - 2014-02-04 - drag and drop re-arrange items bug fix
//2.143 - 2014-02-15 - drag and drop re-arrange items bug fix
//2.144 - 2014-02-18 - easier create new buttons
//2.145 - 2014-02-24 - search button added to top
//2.146 - 2014-03-07 - file upload link fix
//2.147 - 2014-03-10 - custom data search fixed
//2.148 - 2014-04-25 - html output improvement
//2.149 - 2014-07-14 - menu fix and new read only fields
//2.15 - 2014-08-10 - menu position through advanced custom_data_menu_order_X
//2.151 - 2014-08-18 - select drop down fix
//2.152 - 2015-01-07 - file upload improvement
module_config::register_css('data', 'data.css');
module_config::register_js('data', 'data.js');
//hook_handle_callback('custom_data_hook_location',_CUSTOM_DATA_HOOK_LOCATION_JOB_FOOTER, 'job', $job_id, $job);
hook_add('custom_data_hook_location', 'module_data::hook_location');
}
示例13: full_link
//module_config::register_css('theme','metis_style.css',full_link('/includes/plugin_theme/themes/metis/css/metis_style.css'));
if (!isset($_REQUEST['display_mode']) || isset($_REQUEST['display_mode']) && $_REQUEST['display_mode'] != 'iframe' && $_REQUEST['display_mode'] != 'ajax') {
$_REQUEST['display_mode'] = 'metis';
}
require_once module_theme::include_ucm('includes/plugin_theme/themes/metis/metis_functions.php');
/**
* <link rel="stylesheet" href="assets/lib/bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="assets/css/main.css"/>
<link rel="stylesheet" href="assets/lib/Font-Awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/css/theme.css">
<script src="assets/lib/modernizr-build.min.js"></script>
*
* <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="assets/lib/jquery.min.js"><\/script>')</script>
<script src="assets/lib/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="assets/js/style-switcher.js"></script>
<script src="assets/js/main.js"></script>
*/
module_config::register_css('theme', 'bootstrap.css', full_link('/includes/plugin_theme/themes/metis/lib/bootstrap/css/bootstrap.min.css'), 5);
module_config::register_css('theme', 'main.css', full_link('/includes/plugin_theme/themes/metis/css/main.css'), 6);
module_config::register_css('theme', 'font-awesome.css', full_link('/includes/plugin_theme/themes/metis/lib/font-awesome-4.0.3/css/font-awesome.css'), 7);
module_config::register_css('theme', 'theme.css', full_link('/includes/plugin_theme/themes/metis/css/theme.css'), 8);
if (isset($_SERVER['REQUEST_URI']) && (strpos($_SERVER['REQUEST_URI'], _EXTERNAL_TUNNEL) || strpos($_SERVER['REQUEST_URI'], _EXTERNAL_TUNNEL_REWRITE))) {
module_config::register_css('theme', 'external.css', full_link('/includes/plugin_theme/themes/metis/css/external.css'), 100);
}
module_config::register_js('theme', 'bootstrap.js', full_link('/includes/plugin_theme/themes/metis/lib/bootstrap/js/bootstrap.min.js'));
module_config::register_js('theme', 'main.js', full_link('/includes/plugin_theme/themes/metis/js/main.js'));
module_config::register_js('theme', 'metis.js', full_link('/includes/plugin_theme/themes/metis/js/metis.js'));
//module_config::register_js('theme','config.js',full_link('/includes/plugin_theme/themes/whitelabel1/js/config.js'));
//module_config::register_js('theme','script.js',full_link('/includes/plugin_theme/themes/whitelabel1/js/script.js'));
示例14: init
public function init()
{
$this->links = array();
$this->quote_types = array();
$this->module_name = "quote";
$this->module_position = 15.9;
module_config::register_css('quote', 'quote.css');
module_config::register_js('quote', 'quote.js');
if (class_exists('module_template', false) && module_security::is_logged_in()) {
module_template::init_template('quote_external', '{HEADER}<h2>Quote Overview</h2>
Quote Name: <strong>{QUOTE_NAME}</strong> <br/>
{PROJECT_TYPE} Name: <strong>{PROJECT_NAME}</strong> <br/>
Create Date: <strong>{DATE_CREATE}</strong><br/>
Quote Status: <strong>{if:DATE_APPROVED}Accepted on {DATE_APPROVED}{else}Pending{endif:DATE_APPROVED}</strong> <br/>
{DESCRIPTION}
<br/>
{if:date_approved}
<h2>Quote Has Been Accepted</h2>
<p>Thank you, the quote was accepted by <strong>{APPROVED_BY}</strong> on <strong>{DATE_APPROVED}</strong>.</p>
{else}
<h2>Quote Approval Pending</h2>
<p>If you would like to approve this quote please complete the form below:</p>
<form action="" method="POST">
<p>Your Name: <input type="text" name="quote_approve_name"> </p>
<p><input type="checkbox" name="quote_approve_go" value="yes"> Yes, I approve this quote. </p>
<p><input type="submit" name="quote_approve" value="Approve Quote" class="submit_button save_button"></p>
</form>
{endif:date_approved}
<h2>Task List</h2> <br/>
{TASK_LIST}
', 'Used when displaying the external view of a quote for approval.', 'code');
module_template::init_template('quote_pdf', '<html>
<head>
<title>Quote</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
body{
font-family:Helvetica, sans-serif;
padding:0;
margin:0;
}
td{
font-family:Helvetica, sans-serif;
padding:2px;
}
h3{
font-size: 22px;
font-weight: bold;
margin:10px 0 10px 0;
padding:0 0 5px 0;
border-bottom:1px solid #6f6f6f;
width:100%;
}
.style11 {
font-size: 24px;
font-weight: bold;
margin:0;
padding:0;
}
.task_header,
.task_header th{
background-color:#e8e8e8;
color: #6f6f6f;
font-weight: bold;
}
tr.odd{
background-color:#f9f9f9;
}
</style>
</head>
<body>
<table style="width: 100%;" border="0" cellspacing="0" cellpadding="1" align="center">
<tbody>
<tr>
<td colspan="2" align="left" valign="top"><img title="Logo" src="http://ultimateclientmanager.com/images/logo_ucm.png" alt="Logo" width="202" height="60" /></td>
<td colspan="2" align="left" valign="top"><span class="style11">QUOTE</span></td>
</tr>
<tr>
<td width="12%"> </td>
<td width="43%"> </td>
<td width="14%"> </td>
<td width="31%"> </td>
</tr>
<tr>
<td><strong>ABN:</strong></td>
<td>12 345 678 912</td>
<td><strong>Quote No: <br /> </strong></td>
<td>{QUOTE_NUMBER}</td>
</tr>
<tr>
<td><strong>Email: </strong></td>
<td>your@company.com</td>
<td><strong>Issued Date:</strong></td>
<td>{DATE_CREATE}</td>
</tr>
<tr>
<td><strong>Web: </strong></td>
<td>www.company.com</td>
<td><strong>Valid Until:</strong></td>
//.........这里部分代码省略.........
示例15: init
public function init()
{
$this->links = array();
$this->product_types = array();
$this->module_name = "product";
$this->module_position = 31;
$this->version = 2.155;
// 2.155 - 2015-07-18 - product search
// 2.154 - 2015-06-28 - started work on product API
// 2.153 - 2015-02-12 - ui fix and product defaults (tax/bill/type)
// 2.152 - 2014-01-23 - new quote feature
// 2.151 - 2013-11-15 - working on new UI
// 2.15 - 2013-10-02 - bulk product delete and product category import fix
// 2.149 - 2013-09-08 - faq permission fix
// 2.148 - 2013-08-07 - css improvement
// 2.147 - 2013-06-16 - javascript fix
// 2.146 - 2013-06-07 - further work on product categories
// 2.145 - 2013-05-28 - further work on product categories
// 2.144 - 2013-05-28 - started work on product categories
// 2.143 - 2013-04-27 - css fix for large product list
// 2.142 - 2013-04-16 - product fix in invoice
// 2.141 - 2013-04-05 - product support in invoices
// 2.14 - product import via CSV
// 2.13 - permission fix
// 2.12 - product permissions
// 2.11 - initial release
hook_add('api_callback_product', 'module_product::api_filter_product');
if (module_security::is_logged_in() && self::can_i('view', 'Products')) {
module_config::register_css('product', 'product.css');
module_config::register_js('product', 'product.js');
if (isset($_REQUEST['_products_ajax'])) {
switch ($_REQUEST['_products_ajax']) {
case 'products_ajax_search':
// $sent = headers_sent($file, $line);
// echo 'here';
// print_r($sent);
// print_r($file);
// print_r($line);
if (self::$_product_count === false) {
self::$_product_count = count(self::get_products());
}
$product_name = isset($_REQUEST['product_name']) ? $_REQUEST['product_name'] : '';
if (self::$_product_count > 0) {
$search = array();
if (strlen($product_name) > 2) {
$search['general'] = $product_name;
}
$products = self::get_products($search);
if (count($products) > 0) {
// sort products by categories.
$products_in_categories = array();
foreach ($products as $product_id => $product) {
if ($product['product_category_id'] && $product['product_category_name']) {
if (!isset($products_in_categories[$product['product_category_name']])) {
$products_in_categories[$product['product_category_name']] = array();
}
$products_in_categories[$product['product_category_name']][] = $product;
unset($products[$product_id]);
} else {
}
}
$cat_id = 1;
?>
<ul>
<?php
foreach ($products_in_categories as $category_name => $cat_products) {
?>
<li>
<a href="#" class="product_category_parent"><?php
echo htmlspecialchars($category_name);
?>
</a> (<?php
_e('%s products', count($cat_products));
?>
)
<ul style="display:none;" id="product_category_<?php
echo $cat_id++;
?>
">
<?php
foreach ($cat_products as $product) {
?>
<li>
<a href="#" onclick="return ucm.product.select_product(<?php
echo $product['product_id'];
?>
);"> <?php
echo htmlspecialchars($product['name']);
?>
</a>
</li>
<?php
}
?>
</ul>
//.........这里部分代码省略.........