本文整理汇总了PHP中Requirements::customJS方法的典型用法代码示例。如果您正苦于以下问题:PHP Requirements::customJS方法的具体用法?PHP Requirements::customJS怎么用?PHP Requirements::customJS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Requirements
的用法示例。
在下文中一共展示了Requirements::customJS方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: requirements
/**
* CSS/JS requirements
*/
public function requirements()
{
Requirements::customHeadTags(Kohana::config("globalcode.head"), 'globalcode-head');
Requirements::js("media/js/jquery.js");
Requirements::js("media/js/jquery.ui.min.js");
//Requirements::js(Kohana::config('core.site_protocol')."://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js");
Requirements::js("media/js/jquery.pngFix.pack.js");
Requirements::js("media/js/jquery.timeago.js");
Requirements::css("media/css/jquery-ui-themeroller.css");
Requirements::js('media/js/global.js');
Requirements::css('media/css/global.css');
if ($this->map_enabled) {
Requirements::js("media/js/OpenLayers.js");
Requirements::js("media/js/ushahidi.js");
if ($this->api_url) {
Requirements::js($this->api_url);
}
Requirements::customJS("OpenLayers.ImgPath = '" . url::file_loc('js') . "media/img/openlayers/" . "';", 'openlayers-imgpath');
Requirements::css("media/css/openlayers.css");
}
if ($this->hovertip_enabled) {
Requirements::js('media/js/jquery.hovertip-1.0.js');
Requirements::css('media/css/jquery.hovertip-1.0.css', '');
Requirements::customJS("\$(function() {\n\t\t\t\t\t\tif(\$('.tooltip[title]') != null)\n\t\t\t\t\t\t\$('.tooltip[title]').hovertip();\n\t\t\t\t\t});", 'tooltip-js');
}
if ($this->slider_enabled) {
Requirements::js('media/js/selectToUISlider.jQuery.js');
}
if ($this->timeline_enabled) {
Requirements::js("media/js/jquery.jqplot.min.js");
Requirements::css("media/css/jquery.jqplot.min.css");
Requirements::js("media/js/jqplot.dateAxisRenderer.min.js");
Requirements::js("media/js/jqplot.barRenderer.min.js");
// HT: added for bar graph
Requirements::js("media/js/jqplot.pointLabels.min.js");
// HT: added for showing point label
}
if ($this->treeview_enabled) {
Requirements::css("media/css/jquery.treeview.css");
Requirements::js("media/js/jquery.treeview.js");
}
// Load ProtoChart
if ($this->protochart_enabled) {
Requirements::customJS("jQuery.noConflict()", 'jquery-noconflict');
Requirements::js('media/js/protochart/prototype.js');
Requirements::customHeadTags('<!--[if IE]>' . html::script(url::file_loc('js') . 'media/js/protochart/excanvas-compressed', TRUE) . '<![endif]-->', 'ie-excanvas-compressed');
Requirements::js('media/js/protochart/ProtoChart.js');
}
// Load Raphael
if ($this->raphael_enabled) {
// The only reason we include prototype is to keep the div element naming convention consistent
//Requirements::js('media/js/protochart/prototype.js');
Requirements::js('media/js/raphael.js');
Requirements::customJS('var impact_json = ' . $this->impact_json . ';', 'impact_json');
Requirements::js('media/js/raphael-ushahidi-impact.js');
}
if ($this->validator_enabled) {
Requirements::js("media/js/jquery.validate.min.js");
}
if ($this->photoslider_enabled) {
Requirements::css("media/css/picbox/picbox.css");
Requirements::js("media/js/picbox.js");
}
if ($this->colorpicker_enabled) {
Requirements::css("media/css/colorpicker.css");
Requirements::js("media/js/colorpicker.js");
}
// Load jwysiwyg
if ($this->editor_enabled) {
Requirements::css('media/js/jwysiwyg/jquery.wysiwyg.css');
Requirements::css('media/js/jwysiwyg/plugins/fileManager/wysiwyg.fileManager.css');
if (Kohana::config("cdn.cdn_ignore_jwysiwyg") == TRUE) {
Requirements::js(url::file_loc('ignore') . 'media/js/jwysiwyg/jquery.wysiwyg.js');
// not sure what the hell to do about this
Requirements::js(url::file_loc('ignore') . 'media/js/jwysiwyg/controls/wysiwyg.link.js');
Requirements::js(url::file_loc('ignore') . 'media/js/jwysiwyg/controls/wysiwyg.image.js');
Requirements::js(url::file_loc('ignore') . 'media/js/jwysiwyg/controls/wysiwyg.table.js');
Requirements::js(url::file_loc('ignore') . 'media/js/jwysiwyg/plugins/wysiwyg.fullscreen.js');
Requirements::js(url::file_loc('ignore') . 'media/js/jwysiwyg/plugins/wysiwyg.rmFormat.js');
Requirements::js(url::file_loc('ignore') . 'media/js/jwysiwyg/plugins/wysiwyg.fileManager.js');
} else {
Requirements::js('media/js/jwysiwyg/jquery.wysiwyg.js');
Requirements::js('media/js/jwysiwyg/controls/wysiwyg.link.js');
Requirements::js('media/js/jwysiwyg/controls/wysiwyg.image.js');
Requirements::js('media/js/jwysiwyg/controls/wysiwyg.table.js');
Requirements::js('media/js/jwysiwyg/plugins/wysiwyg.fullscreen.js');
Requirements::js('media/js/jwysiwyg/plugins/wysiwyg.rmFormat.js');
Requirements::js('media/js/jwysiwyg/plugins/wysiwyg.fileManager.js');
}
}
// Table Row Sort
if ($this->tablerowsort_enabled) {
Requirements::js('media/js/jquery.tablednd_0_5.js');
}
// JSON2 for IE+
if ($this->json2_enabled) {
Requirements::js('media/js/json2.js');
//.........这里部分代码省略.........