本文整理汇总了PHP中plugin::add_javascript方法的典型用法代码示例。如果您正苦于以下问题:PHP plugin::add_javascript方法的具体用法?PHP plugin::add_javascript怎么用?PHP plugin::add_javascript使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plugin
的用法示例。
在下文中一共展示了plugin::add_javascript方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add
/**
* Adds all the events to the main Ushahidi application
*/
public function add()
{
// Add a Sub-Nav Link
Event::add('ushahidi_action.nav_admin_reports', array($this, '_report_link'));
// Only add the events if we are on that controller
if (Router::$current_uri == "admin/reports") {
plugin::add_stylesheet('analysis/views/css/buttons');
// Add Buttons to the report List
Event::add('ushahidi_action.report_extra_admin', array($this, '_reports_list_buttons'));
} elseif (Router::$controller == 'analysis') {
plugin::add_javascript('analysis/views/js/ui.dialog');
plugin::add_javascript('analysis/views/js/ui.draggable');
plugin::add_javascript('analysis/views/js/ui.resizable');
plugin::add_stylesheet('analysis/views/css/main');
} elseif (strripos(Router::$current_uri, "admin/reports/edit") !== false) {
plugin::add_stylesheet('analysis/views/css/report');
plugin::add_javascript('analysis/views/js/jquery.copy.min');
Event::add('ushahidi_action.report_pre_form_admin', array($this, '_reports_list_analysis'));
Event::add('ushahidi_action.header_scripts_admin', array($this, '_save_analysis_js'));
Event::add('ushahidi_action.report_edit', array($this, '_save_analysis'));
} elseif (strripos(Router::$current_uri, "reports/submit") !== false) {
//Add dropdown fields to the submit form
Event::add('ushahidi_action.report_form', array($this, '_submit_form'));
//Save the contents of the dropdown
Event::add('ushahidi_action.report_submit', array($this, '_handle_post_data'));
Event::add('ushahidi_action.report_add', array($this, '_save_submit_form'));
}
}
示例2: __construct
public function __construct()
{
parent::__construct();
// Set Table Prefix
$this->table_prefix = Kohana::config('database.default.table_prefix');
// Load Header & Footer
$this->template->header = new View('keitai/header');
$this->template->footer = new View('keitai/footer');
$this->template->header->site_name = Kohana::config('settings.site_name');
$this->template->header->site_tagline = Kohana::config('settings.site_tagline');
plugin::add_javascript('keitai/views/js/jquery');
plugin::add_javascript('keitai/views/js/jquery.treeview');
plugin::add_javascript('keitai/views/js/expand');
plugin::add_stylesheet('keitai/views/css/styles');
plugin::add_stylesheet('keitai/views/css/jquery.treeview');
$this->template->header->show_map = FALSE;
$this->template->header->js = "";
$this->template->header->breadcrumbs = "";
// Google Analytics
$google_analytics = Kohana::config('settings.google_analytics');
$this->template->footer->google_analytics = $this->_google_analytics($google_analytics);
$this->template->header->latlong = (isset($_GET['latlong'])) ? $_GET['latlong'] : "";
$this->template->footer->latlong = (isset($_GET['latlong'])) ? $_GET['latlong'] : "";
}
示例3: add
/**
* Adds all the events to the main Ushahidi application
*/
public function add()
{
// Add a Sub-Nav Link
Event::add('ushahidi_action.nav_admin_settings', array($this, '_settings_link'));
Event::add('ushahidi_action.nav_main_top', array($this, '_top_nav_link'));
// Only add the events if we are on the main controller
if (Router::$controller == 'main') {
switch (Router::$method) {
// Hook into the main dashboard
case 'index':
plugin::add_stylesheet('flickrwijit/media/css/style');
plugin::add_stylesheet('../media/css/picbox/picbox');
plugin::add_javascript('../media/js/picbox');
Event::add('ushahidi_action.main_sidebar', array($this, '_display_flickrwiji'));
break;
}
} elseif (Router::$controller == 'flickrwijit') {
// Add Flickrwijit to settings page
switch (Router::$method) {
case 'index':
//Hook js and css files into flickrwijit page
plugin::add_stylesheet('flickrwijit/media/css/style');
plugin::add_stylesheet('../media/css/picbox/picbox');
plugin::add_javascript('../media/js/picbox');
break;
}
}
}
示例4: setup_adminmap
public static function setup_adminmap($map_controller, $map_view = "adminmap/mapview", $map_css = "adminmap/css/adminmap")
{
//set the CSS for this
plugin::add_stylesheet($map_css);
plugin::add_javascript("adminmap/js/jquery.flot");
plugin::add_javascript("adminmap/js/excanvas.min");
plugin::add_javascript("adminmap/js/timeline");
$map_controller->template->content = new View($map_view);
// Get Default Color
$map_controller->template->content->default_map_all = Kohana::config('settings.default_map_all');
}
示例5: add
/**
* Adds all the events to the main Ushahidi application
*/
public function add()
{
// Only add the events if we are on that controller
if (Router::$controller == 'main')
{
plugin::add_javascript('fullscreenmap/views/js/jquery.colorbox');
#plugin::add_javascript('fullscreenmap/views/js/ui.draggable');
plugin::add_stylesheet('fullscreenmap/views/css/fullscreenmap');
plugin::add_stylesheet('fullscreenmap/views/css/colorbox');
Event::add('ushahidi_action.header_scripts', array($this, '_main_js'));
Event::add('ushahidi_action.map_main_filters', array($this, '_button'));
}
}
示例6: add
/**
* Adds all the events to the main Ushahidi application
*/
public function add()
{
//Just in case we need this
Event::add('ushahidi_action.nav_main_top', array($this, '_add_big_map_tab'));
//adds the big map tab
Event::add('ushahidi_action.nav_admin_main_top', array($this, '_admin_nav_tab'));
//adds the admin map tab
if (Router::$controller == "main") {
Event::add('ushahidi_action.map_main_filters', array($this, '_add_big_map_main_button'));
//adds the big map tab
//use sneaky JS
plugin::add_javascript("adminmap/js/embedd_setup");
plugin::add_stylesheet("adminmap/css/embedd_setup");
Event::add('ushahidi_action.main_sidebar', array($this, '_add_embedd'));
}
//if dealing with the
if (Router::$controller == "reports") {
Event::add('ushahidi_filter.fetch_incidents_set_params', array($this, '_add_logical_operator_filter'));
Event::add('ushahidi_action.report_filters_ui', array($this, '_add_report_filter_ui'));
Event::add('ushahidi_action.header_scripts', array($this, '_add_report_filter_js'));
}
}
示例7: add
/**
* Adds all the events to the main Ushahidi application
*/
public function add()
{
// Only add the events if we are on that controller
if (Router::$controller == 'reports') {
switch (Router::$method) {
// Hook into the Report Add/Edit Form in Admin
case 'edit':
plugin::add_stylesheet('locationhighlightlite/media/css/locationhighlightlite');
plugin::add_javascript('locationhighlightlite/media/js/locationhighlightlite');
break;
//Hook into frontend Submit View
//Hook into frontend Submit View
case 'submit':
plugin::add_stylesheet('locationhighlightlite/media/css/locationhighlightlite');
plugin::add_javascript('locationhighlightlite/media/js/locationhighlightlite');
break;
default:
break;
}
//end of switch
}
//end of if reports
}
示例8: index
public function index($width = 400)
{
$this->template->header->this_page = 'bigmap';
$this->template->content = new View('adminmap/iframe_mapview');
$this->template->content->site_name = $this->template->header->site_name;
//set the CSS for this
plugin::add_stylesheet("adminmap/css/iframe_adminmap");
plugin::add_stylesheet("adminmap/css/jquery.hovertip-1.0");
//make sure the right java script files are used.
//plugin::add_javascript("adminmap/js/jquery.address-1.4.min.js");
plugin::add_javascript("adminmap/js/jquery.flot");
plugin::add_javascript("adminmap/js/excanvas.min");
plugin::add_javascript("adminmap/js/timeline");
plugin::add_javascript("adminmap/js/jquery.hovertip-1.0");
// Cacheable Main Controller
$this->is_cachable = TRUE;
// Map and Slider Blocks
$div_timeline = new View('adminmap/iframe_main_timeline');
// Filter::map_timeline - Modify Main Map Block
Event::run('ushahidi_filter.map_timeline', $div_timeline);
$this->template->content->div_timeline = $div_timeline;
$this->template->content->width = $width;
// Get locale
$l = Kohana::config('locale.language.0');
// Get all active top level categories
$parent_categories = array();
foreach (ORM::factory('category')->where('category_visible', '1')->where('parent_id', '0')->find_all() as $category) {
// Get The Children
$children = array();
foreach ($category->children as $child) {
// Check for localization of child category
$translated_title = Category_Lang_Model::category_title($child->id, $l);
if ($translated_title) {
$display_title = $translated_title;
} else {
$display_title = $child->category_title;
}
$children[$child->id] = array($display_title, $child->category_color, $child->category_image);
if ($child->category_trusted) {
// Get Trusted Category Count
$trusted = ORM::factory("incident")->join("incident_category", "incident.id", "incident_category.incident_id")->where("category_id", $child->id);
if (!$trusted->count_all()) {
unset($children[$child->id]);
}
}
}
// Check for localization of parent category
$translated_title = Category_Lang_Model::category_title($category->id, $l);
if ($translated_title) {
$display_title = $translated_title;
} else {
$display_title = $category->category_title;
}
// Put it all together
$parent_categories[$category->id] = array($display_title, $category->category_color, $category->category_image, $children);
if ($category->category_trusted) {
// Get Trusted Category Count
$trusted = ORM::factory("incident")->join("incident_category", "incident.id", "incident_category.incident_id")->where("category_id", $category->id);
if (!$trusted->count_all()) {
unset($parent_categories[$category->id]);
}
}
}
$this->template->content->categories = $parent_categories;
// Get all active Layers (KMZ/KML)
$layers = array();
$config_layers = Kohana::config('map.layers');
// use config/map layers if set
if ($config_layers == $layers) {
foreach (ORM::factory('layer')->where('layer_visible', 1)->find_all() as $layer) {
$layers[$layer->id] = array($layer->layer_name, $layer->layer_color, $layer->layer_url, $layer->layer_file);
}
} else {
$layers = $config_layers;
}
$this->template->content->layers = $layers;
// Get all active Shares
$shares = array();
foreach (ORM::factory('sharing')->where('sharing_active', 1)->find_all() as $share) {
$shares[$share->id] = array($share->sharing_name, $share->sharing_color);
}
$this->template->content->shares = $shares;
// Get Default Color
$this->template->content->default_map_all = Kohana::config('settings.default_map_all');
// Get The START, END and Incident Dates
$startDate = "";
$endDate = "";
$display_startDate = 0;
$display_endDate = 0;
$db = new Database();
// Next, Get the Range of Years
$query = $db->query('SELECT DATE_FORMAT(incident_date, \'%Y-%c\') AS dates FROM ' . $this->table_prefix . 'incident WHERE incident_active = 1 GROUP BY DATE_FORMAT(incident_date, \'%Y-%c\') ORDER BY incident_date');
$first_year = date('Y');
$last_year = date('Y');
$first_month = 1;
$last_month = 12;
$i = 0;
foreach ($query as $data) {
$date = explode('-', $data->dates);
$year = $date[0];
//.........这里部分代码省略.........
示例9: index
public function index($group_id, $width = 400)
{
$group = ORM::factory('simplegroups_groups', $group_id)->find($group_id);
$this->template->header->this_page = 'bigmap';
$this->template->content = new View('adminmap/iframe_mapview');
$this->template->content->site_name = $group->name;
//set the CSS for this
plugin::add_stylesheet("adminmap/css/iframe_adminmap");
plugin::add_stylesheet("adminmap/css/jquery.hovertip-1.0");
//make sure the right java script files are used.
//plugin::add_javascript("adminmap/js/jquery.address-1.4.min.js");
plugin::add_javascript("adminmap/js/jquery.flot");
plugin::add_javascript("adminmap/js/excanvas.min");
plugin::add_javascript("adminmap/js/timeline");
plugin::add_javascript("adminmap/js/jquery.hovertip-1.0");
// Cacheable Main Controller
$this->is_cachable = TRUE;
// Map and Slider Blocks
$div_timeline = new View('adminmap/iframe_main_timeline');
// Filter::map_timeline - Modify Main Map Block
Event::run('ushahidi_filter.map_timeline', $div_timeline);
$this->template->content->div_timeline = $div_timeline;
$this->template->content->width = $width;
// Get locale
$l = Kohana::config('locale.language.0');
// Get all active top level categories
//$parent_categories = array();
adminmap_helper::set_categories($this, false, $group);
//$this->template->content->categories = $parent_categories;
// Get all active Layers (KMZ/KML)
$layers = array();
$config_layers = Kohana::config('map.layers');
// use config/map layers if set
if ($config_layers == $layers) {
foreach (ORM::factory('layer')->where('layer_visible', 1)->find_all() as $layer) {
$layers[$layer->id] = array($layer->layer_name, $layer->layer_color, $layer->layer_url, $layer->layer_file);
}
} else {
$layers = $config_layers;
}
$this->template->content->layers = $layers;
// Get all active Shares
$shares = array();
foreach (ORM::factory('sharing')->where('sharing_active', 1)->find_all() as $share) {
$shares[$share->id] = array($share->sharing_name, $share->sharing_color);
}
$this->template->content->shares = $shares;
// Get Default Color
$this->template->content->default_map_all = Kohana::config('settings.default_map_all');
// Get The START, END and most ACTIVE Incident Dates
$startDate = "";
$endDate = "";
$active_month = 0;
$active_startDate = 0;
$active_endDate = 0;
$db = new Database();
// First Get The Most Active Month
$query = $db->query('SELECT incident_date, count(*) AS incident_count FROM ' . $this->table_prefix . 'incident WHERE incident_active = 1 GROUP BY DATE_FORMAT(incident_date, \'%Y-%m\') ORDER BY incident_count DESC LIMIT 1');
foreach ($query as $query_active) {
$active_month = date('n', strtotime($query_active->incident_date));
$active_year = date('Y', strtotime($query_active->incident_date));
$active_startDate = strtotime($active_year . "-" . $active_month . "-01");
$active_endDate = strtotime($active_year . "-" . $active_month . "-" . date('t', mktime(0, 0, 0, $active_month, 1)) . " 23:59:59");
}
//run some custom events for the timeline plugin
Event::run('ushahidi_filter.active_startDate', $active_startDate);
Event::run('ushahidi_filter.active_endDate', $active_endDate);
Event::run('ushahidi_filter.active_month', $active_month);
// Next, Get the Range of Years
$query = $db->query('SELECT DATE_FORMAT(incident_date, \'%Y\') AS incident_date FROM ' . $this->table_prefix . 'incident WHERE incident_active = 1 GROUP BY DATE_FORMAT(incident_date, \'%Y\') ORDER BY incident_date');
foreach ($query as $slider_date) {
$years = $slider_date->incident_date;
$startDate .= "<optgroup label=\"" . $years . "\">";
for ($i = 1; $i <= 12; $i++) {
if ($i < 10) {
$i = "0" . $i;
}
$startDate .= "<option value=\"" . strtotime($years . "-" . $i . "-01") . "\"";
if ($active_month && (int) $i == $active_month - 1) {
$startDate .= " selected=\"selected\" ";
}
$startDate .= ">" . date('M', mktime(0, 0, 0, $i, 1)) . " " . $years . "</option>";
}
$startDate .= "</optgroup>";
$endDate .= "<optgroup label=\"" . $years . "\">";
for ($i = 1; $i <= 12; $i++) {
if ($i < 10) {
$i = "0" . $i;
}
$endDate .= "<option value=\"" . strtotime($years . "-" . $i . "-" . date('t', mktime(0, 0, 0, $i, 1)) . " 23:59:59") . "\"";
// Focus on the most active month or set December as month of endDate
if ($active_month && (int) $i == $active_month + 1 || $i == 12 && preg_match('/selected/', $endDate) == 0) {
$endDate .= " selected=\"selected\" ";
}
$endDate .= ">" . date('M', mktime(0, 0, 0, $i, 1)) . " " . $years . "</option>";
}
$endDate .= "</optgroup>";
}
//run more custom events for the timeline plugin
Event::run('ushahidi_filter.startDate', $startDate);
//.........这里部分代码省略.........
示例10: index
/**
* Function: index
*
* Description: This controller calls the helper functions to create and assemble the various components
* needed to make a working map
*
* Views: enhancedmap/print_mapview, enhancedmap/print_map_header
*
* Results: User gets a map that they can interact with
*/
public function index()
{
////////////////////////////////////////////////////////////////////////////////////////////////
// custom JS that the print map needs
plugin::add_javascript("enhancedmap/js/jquery.address-1.4.min.js");
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Setup the map
enhancedmap_helper::setup_enhancedmap($this, "enhancedmap/print_mapview", "enhancedmap/css/print_enhancedmap");
//ARE WE CLUSTERING?
$clustering = cookie::get('clustering', Kohana::config('settings.allow_clustering'));
/////////////////////////////////////////////////////////////////////////////////////////////////////////
//get the CATEGORIES
/////////////////////////////////////////////////////////////////////////////////////////////////////////
if (isset($this->group_id) && $this->group_id) {
$group_id = $this->group_id;
$group = ORM::factory('simplegroups_groups', $this->group_id)->find($this->group_id);
$this->template->content->div_categories_filter = enhancedmap_helper::set_categories(false, $group);
$urlParams = array('sgid' => $group_id);
} else {
//get the categories
$this->template->content->div_categories_filter = enhancedmap_helper::set_categories();
$urlParams = array();
}
//status filter
$this->template->content->div_status_filter = enhancedmap_helper::get_status_filter();
//boolean filter
$this->template->content->div_boolean_filter = enhancedmap_helper::get_boolean_filter();
//dot size selector
$this->template->content->div_dotsize_selector = enhancedmap_helper::get_dotsize_selector();
//clustering selector
$this->template->content->div_clustering_selector = enhancedmap_helper::get_clustering_selector();
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//setup the map
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$json_url = $clustering == 1 ? "bigmap_json/cluster" : "bigmap_json";
$json_timeline_url = "bigmap_json/timeline/";
enhancedmap_helper::set_map($this->template, $this->themes, $json_url, $json_timeline_url, 'enhancedmap/print_mapview_js', 'enhancedmap/big_main_map', 'enhancedmap/print_main_timeline', $urlParams);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//setup the overlays and shares
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//layers
$this->template->content->div_layers_filter = enhancedmap_helper::set_layers();
//shares
$this->template->content->div_shares_filter = enhancedmap_helper::set_shares(false, false);
plugin::add_stylesheet("enhancedmap/css/jquery.hovertip-1.0");
plugin::add_javascript("enhancedmap/js/jquery.hovertip-1.0");
$this->template->header = new View('enhancedmap/print_map_header');
$this->template->header->site_name = $this->site_name;
$this->template->header->this_page = "printmap";
// Rebuild Header Block
$this->template->header->header_block = $this->themes->header_block();
}
示例11: index
public function index()
{
////////////////////////////////////////////////////////////////////////////////////////////////
// custom JS that the print map needs
plugin::add_javascript("adminmap/js/jquery.address-1.4.min.js");
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Setup the map
adminmap_helper::setup_adminmap($this, "adminmap/print_mapview", "adminmap/css/print_adminmap");
//ARE WE CLUSTERING?
$clustering = Kohana::config('settings.allow_clustering');
/////////////////////////////////////////////////////////////////////////////////////////////////////////
//get the CATEGORIES
/////////////////////////////////////////////////////////////////////////////////////////////////////////
if (isset($this->group_id) && $this->group_id) {
$group_id = $this->group_id;
$group = ORM::factory('simplegroups_groups', $this->group_id)->find($this->group_id);
//get the categories
adminmap_helper::set_categories($this, false, $group);
$json_url = $clustering == 1 ? "simplegroupmap_json/cluster/{$group_id}" : "simplegroupmap_json/index/{$group_id}";
$json_timeline_url = "simplegroupmap_json/timeline/{$group_id}/";
} else {
//get the categories
adminmap_helper::set_categories($this, false);
$json_url = $clustering == 1 ? "bigmap_json/cluster" : "bigmap_json";
$json_timeline_url = "bigmap_json/timeline/";
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//setup the map
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
adminmap_helper::set_map($this->template, $this->themes, $json_url, $json_timeline_url, 'adminmap/print_mapview_js', 'adminmap/big_main_map', 'adminmap/print_main_timeline');
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//setup the overlays and shares
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
adminmap_helper::set_overlays_shares($this);
plugin::add_stylesheet("adminmap/css/jquery.hovertip-1.0");
plugin::add_javascript("adminmap/js/jquery.hovertip-1.0");
$this->template->header = new View('adminmap/print_map_header');
$this->template->header->site_name = $this->site_name;
$this->template->header->this_page = "";
// Rebuild Header Block
$this->template->header->header_block = $this->themes->header_block();
}
示例12: index
/**
* Function: index
*
* Description: This controller calls the helper functions to create and assemble the various components
* needed to make a working map
*
* @param int $width - Width of the iframe
*
* Views: enhancedmap/iframe_mapview,
*
* Results: User gets a map that they can interact with
*/
public function index($width = 400)
{
//set the title of the page
$this->template->header->this_page = 'bigmap';
//javascript for the big map special features
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Setup the map
enhancedmap_helper::setup_enhancedmap($this, "enhancedmap/iframe_mapview", "enhancedmap/css/iframe_adminmap");
//set the site name
$this->template->content->site_name = $this->template->header->site_name;
//set the width of the map
$this->template->content->width = $width;
//ARE WE CLUSTERING?
$clustering = cookie::get('clustering', Kohana::config('settings.allow_clustering'));
/////////////////////////////////////////////////////////////////////////////////////////////////////////
//get the CATEGORIES
/////////////////////////////////////////////////////////////////////////////////////////////////////////
//get the categories
enhancedmap_helper::set_categories($this, false);
$json_url = $clustering == 1 ? "iframemap_json/cluster" : "iframemap_json";
$json_timeline_url = "bigmap_json/timeline/";
//boolean filter
$this->template->content->div_boolean_filter = enhancedmap_helper::get_boolean_filter();
//boolean filter
$this->template->content->div_categories_filter = enhancedmap_helper::set_categories();
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//setup the map
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
enhancedmap_helper::set_map($this->template, $this->themes, $json_url, $json_timeline_url, 'enhancedmap/adminmap_js', 'enhancedmap/big_main_map', 'enhancedmap/iframe_main_timeline');
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//setup the overlays and shares
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//layers
$this->template->content->div_layers_filter = enhancedmap_helper::set_layers();
//shares
$this->template->content->div_shares_filter = enhancedmap_helper::set_shares(false, false);
plugin::add_stylesheet("enhancedmap/css/jquery.hovertip-1.0");
plugin::add_javascript("enhancedmap/js/jquery.hovertip-1.0");
// Rebuild Header Block
$this->template->header->header_block = $this->themes->header_block();
}
示例13: add
/**
* Function: add
*
* Description: Adds all the events to the main Ushahidi application
*
* Views:
*
* Results: This plugin has registered for all the events that it wants to know about
*/
public function add()
{
//Just in case we need this
Event::add('ushahidi_action.nav_main_top', array($this, '_add_big_map_tab'));
//adds the big map tab
Event::add('ushahidi_action.nav_admin_main_top', array($this, '_admin_nav_tab'));
//adds the admin map tab
if (Router::$controller == "main") {
Event::add('ushahidi_action.map_main_filters', array($this, '_add_big_map_main_button'));
//adds the big map tab
//use sneaky JS
if (ORM::factory('enhancedmap_settings')->where('key', 'enable_iframemap')->find()->value == "true") {
plugin::add_javascript("enhancedmap/js/embedd_setup");
plugin::add_stylesheet("enhancedmap/css/embedd_setup");
Event::add('ushahidi_action.main_sidebar', array($this, '_add_embedd'));
}
plugin::add_stylesheet("enhancedmap/css/printmap_link");
Event::add('ushahidi_filter.map_main', array($this, '_add_printmap'));
}
//if dealing with the
if (Router::$controller == "reports") {
Event::add('ushahidi_action.report_filters_ui', array($this, '_add_report_filter_ui'));
Event::add('ushahidi_action.header_scripts', array($this, '_add_report_filter_js'));
}
//always filter the fetch incidents params, well don't use it if the high performance version is at play
if (Router::$controller != "hpbigmap_json" and Router::$controller != "hpiframemap_json" and Router::$controller != "hpadminmap_json") {
plugin::add_javascript("enhancedmap/js/LoadingPanel");
Event::add('ushahidi_filter.fetch_incidents_set_params', array($this, '_add_logical_operator_filter'));
}
if (Router::$controller == "adminmap") {
plugin::add_javascript("enhancedmap/js/LoadingPanel");
//hide the content div
Event::add('ushahidi_action.header_scripts_admin', array($this, '_hide_content_for_adminmap'));
}
//adds the ability to see all approved and unapproved reports
Event::add('ushahidi_filter.fetch_incidents_set_params', array($this, '_add_all_reports_filter'));
}