Пример #1
0
 /**
  * List of external resources including stylesheets and js files used by the data entry helper class.
  */
 public static function get_resources()
 {
     if (self::$resource_list === null) {
         $base = parent::$base_url;
         if (!self::$js_path) {
             self::$js_path = $base . 'media/js/';
         } else {
             if (substr(self::$js_path, -1) != "/") {
                 // ensure a trailing slash
                 self::$js_path .= "/";
             }
         }
         if (!self::$css_path) {
             self::$css_path = $base . 'media/css/';
         } else {
             if (substr(self::$css_path, -1) != "/") {
                 // ensure a trailing slash
                 self::$css_path .= "/";
             }
         }
         global $indicia_theme, $indicia_theme_path;
         if (!isset($indicia_theme)) {
             // Use default theme if page does not specify it's own.
             $indicia_theme = "default";
         }
         if (!isset($indicia_theme_path)) {
             // Use default theme path if page does not specify it's own.
             $indicia_theme_path = preg_replace('/css\\/$/', 'themes/', self::$css_path);
         }
         // ensure a trailing path
         if (substr($indicia_theme_path, -1) !== '/') {
             $indicia_theme_path .= '/';
         }
         self::$resource_list = array('indiciaFns' => array('deps' => array('jquery'), 'javascript' => array(self::$js_path . "indicia.functions.js")), 'jquery' => array('javascript' => array(self::$js_path . "jquery.js", self::$js_path . "ie_vml_sizzlepatch_2.js")), 'openlayers' => array('javascript' => array(self::$js_path . (function_exists('iform_openlayers_get_file') ? iform_openlayers_get_file() : "OpenLayers.js"), self::$js_path . "proj4js.js", self::$js_path . "proj4defs.js", self::$js_path . "lang/en.js")), 'graticule' => array('deps' => array('openlayers'), 'javascript' => array(self::$js_path . "indiciaGraticule.js")), 'clearLayer' => array('deps' => array('openlayers'), 'javascript' => array(self::$js_path . "clearLayer.js")), 'addrowtogrid' => array('deps' => array('validation'), 'javascript' => array(self::$js_path . "addRowToGrid.js")), 'indiciaMapPanel' => array('deps' => array('jquery', 'openlayers', 'jquery_ui', 'jquery_cookie'), 'javascript' => array(self::$js_path . "jquery.indiciaMapPanel.js")), 'indiciaMapEdit' => array('deps' => array('indiciaMap'), 'javascript' => array(self::$js_path . "jquery.indiciaMap.edit.js")), 'postcode_search' => array('javascript' => array(self::$js_path . "postcode_search.js")), 'locationFinder' => array('deps' => array('indiciaMapEdit'), 'javascript' => array(self::$js_path . "jquery.indiciaMap.edit.locationFinder.js")), 'createPersonalSites' => array('deps' => array('jquery'), 'javascript' => array(self::$js_path . "createPersonalSites.js")), 'autocomplete' => array('deps' => array('jquery'), 'stylesheets' => array(self::$css_path . "jquery.autocomplete.css"), 'javascript' => array(self::$js_path . "jquery.autocomplete.js")), 'indicia_locks' => array('deps' => array('jquery_cookie', 'json'), 'javascript' => array(self::$js_path . "indicia.locks.js")), 'jquery_cookie' => array('deps' => array('jquery'), 'javascript' => array(self::$js_path . "jquery.cookie.js")), 'jquery_ui' => array('deps' => array('jquery'), 'stylesheets' => array("{$indicia_theme_path}{$indicia_theme}/jquery-ui.custom.css"), 'javascript' => array(self::$js_path . "jquery-ui.custom.min.js", self::$js_path . "jquery-ui.effects.js")), 'jquery_ui_fr' => array('deps' => array('jquery_ui'), 'javascript' => array(self::$js_path . "jquery.ui.datepicker-fr.js")), 'jquery_form' => array('deps' => array('jquery'), 'javascript' => array(self::$js_path . "jquery.form.js")), 'json' => array('javascript' => array(self::$js_path . "json2.js")), 'reportPicker' => array('deps' => array('treeview'), 'javascript' => array(self::$js_path . "reportPicker.js")), 'treeview' => array('deps' => array('jquery'), 'stylesheets' => array(self::$css_path . "jquery.treeview.css"), 'javascript' => array(self::$js_path . "jquery.treeview.js")), 'treeview_async' => array('deps' => array('treeview'), 'javascript' => array(self::$js_path . "jquery.treeview.async.js", self::$js_path . "jquery.treeview.edit.js")), 'googlemaps' => array('javascript' => array("http://maps.google.com/maps/api/js?sensor=false")), 'virtualearth' => array('javascript' => array('http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1')), 'fancybox' => array('deps' => array('jquery'), 'stylesheets' => array(self::$js_path . 'fancybox/jquery.fancybox.css'), 'javascript' => array(self::$js_path . 'fancybox/jquery.fancybox.pack.js')), 'treeBrowser' => array('deps' => array('jquery', 'jquery_ui'), 'javascript' => array(self::$js_path . "jquery.treebrowser.js")), 'defaultStylesheet' => array('deps' => array(''), 'stylesheets' => array(self::$css_path . "default_site.css"), 'javascript' => array()), 'validation' => array('deps' => array('jquery'), 'javascript' => array(self::$js_path . 'jquery.metadata.js', self::$js_path . 'jquery.validate.js', self::$js_path . 'additional-methods.js')), 'plupload' => array('deps' => array('jquery_ui', 'fancybox'), 'javascript' => array(self::$js_path . 'jquery.uploader.js', self::$js_path . 'plupload/js/plupload.full.min.js')), 'jqplot' => array('stylesheets' => array(self::$js_path . 'jqplot/jquery.jqplot.css'), 'javascript' => array(self::$js_path . 'jqplot/jquery.jqplot.js', '[IE]' . self::$js_path . 'jqplot/excanvas.js')), 'jqplot_bar' => array('javascript' => array(self::$js_path . 'jqplot/plugins/jqplot.barRenderer.min.js')), 'jqplot_pie' => array('javascript' => array(self::$js_path . 'jqplot/plugins/jqplot.pieRenderer.min.js')), 'jqplot_category_axis_renderer' => array('javascript' => array(self::$js_path . 'jqplot/plugins/jqplot.categoryAxisRenderer.min.js')), 'jqplot_canvas_axis_label_renderer' => array('javascript' => array(self::$js_path . 'jqplot/plugins/jqplot.canvasTextRenderer.min.js', self::$js_path . 'jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js')), 'jqplot_trendline' => array('javascript' => array(self::$js_path . 'jqplot/plugins/jqplot.trendline.min.js')), 'reportgrid' => array('deps' => array('jquery_ui'), 'javascript' => array(self::$js_path . 'jquery.reportgrid.js', self::$js_path . 'json2.js')), 'reportfilters' => array('deps' => array('reportgrid'), 'stylesheets' => array(self::$css_path . "report-filters.css"), 'javascript' => array(self::$js_path . 'reportFilters.js')), 'tabs' => array('deps' => array('jquery_ui'), 'javascript' => array(self::$js_path . 'tabs.js')), 'wizardprogress' => array('deps' => array('tabs'), 'stylesheets' => array(self::$css_path . "wizard_progress.css")), 'spatialReports' => array('javascript' => array(self::$js_path . 'spatialReports.js')), 'jsonwidget' => array('deps' => array('jquery'), 'javascript' => array(self::$js_path . "jsonwidget/json.js", self::$js_path . "jsonwidget/jsonedit.js", self::$js_path . "jquery.jsonwidget.js"), 'stylesheets' => array(self::$css_path . "jsonwidget.css")), 'timeentry' => array('javascript' => array(self::$js_path . "jquery.timeentry.pack.js")), 'verification' => array('javascript' => array(self::$js_path . "verification.js")), 'control_speciesmap_controls' => array('deps' => array('jquery', 'openlayers', 'addrowtogrid', 'validation'), 'javascript' => array(self::$js_path . "controls/speciesmap_controls.js")), 'complexAttrGrid' => array('javascript' => array(self::$js_path . "complexAttrGrid.js")));
     }
     return self::$resource_list;
 }
Пример #2
0
 /**
  * List of external resources including stylesheets and js files used by the data entry helper class.
  */
 public static function get_resources()
 {
     if (self::$resource_list === null) {
         $base = parent::$base_url;
         if (!self::$js_path) {
             self::$js_path = $base . 'media/js/';
         } else {
             if (substr(self::$js_path, -1) != "/") {
                 // ensure a trailing slash
                 self::$js_path .= "/";
             }
         }
         if (!self::$css_path) {
             self::$css_path = $base . 'media/css/';
         } else {
             if (substr(self::$css_path, -1) != "/") {
                 // ensure a trailing slash
                 self::$css_path .= "/";
             }
         }
         global $indicia_theme, $indicia_theme_path;
         if (!isset($indicia_theme)) {
             // Use default theme if page does not specify it's own.
             $indicia_theme = "default";
         }
         if (!isset($indicia_theme_path)) {
             // Use default theme path if page does not specify it's own.
             $indicia_theme_path = preg_replace('/css\\/$/', 'themes/', self::$css_path);
         }
         // ensure a trailing path
         if (substr($indicia_theme_path, -1) !== '/') {
             $indicia_theme_path .= '/';
         }
         self::$resource_list = array('jquery' => array('javascript' => array(self::$js_path . "jquery.js", self::$js_path . "ie_vml_sizzlepatch_2.js")), 'openlayers' => array('javascript' => array(self::$js_path . "OpenLayers.js", self::$js_path . "proj4js.js", self::$js_path . "proj4defs.js")), 'graticule' => array('deps' => array('openlayers'), 'javascript' => array(self::$js_path . "indiciaGraticule.js")), 'clearLayer' => array('deps' => array('openlayers'), 'javascript' => array(self::$js_path . "clearLayer.js")), 'addrowtogrid' => array('javascript' => array(self::$js_path . "addRowToGrid.js")), 'indiciaMapPanel' => array('deps' => array('jquery', 'openlayers', 'jquery_ui'), 'javascript' => array(self::$js_path . "jquery.indiciaMapPanel.js", self::$js_path . "jquery.cookie.js")), 'indiciaMapEdit' => array('deps' => array('indiciaMap'), 'javascript' => array(self::$js_path . "jquery.indiciaMap.edit.js")), 'georeference_google_search_api' => array('javascript' => array("http://www.google.com/jsapi?key=" . parent::$google_search_api_key)), 'locationFinder' => array('deps' => array('indiciaMapEdit'), 'javascript' => array(self::$js_path . "jquery.indiciaMap.edit.locationFinder.js")), 'autocomplete' => array('deps' => array('jquery'), 'stylesheets' => array(self::$css_path . "jquery.autocomplete.css"), 'javascript' => array(self::$js_path . "jquery.autocomplete.js")), 'jquery_ui' => array('deps' => array('jquery'), 'stylesheets' => array("{$indicia_theme_path}{$indicia_theme}/jquery-ui.custom.css"), 'javascript' => array(self::$js_path . "jquery-ui.custom.min.js", self::$js_path . "jquery-ui.effects.js")), 'jquery_ui_fr' => array('deps' => array('jquery_ui'), 'javascript' => array(self::$js_path . "jquery.ui.datepicker-fr.js")), 'jquery_form' => array('deps' => array('jquery'), 'javascript' => array(self::$js_path . "jquery.form.js")), 'json' => array('javascript' => array(self::$js_path . "json2.js")), 'reportPicker' => array('deps' => array('treeview'), 'javascript' => array(self::$js_path . "reportPicker.js")), 'treeview' => array('deps' => array('jquery'), 'stylesheets' => array(self::$css_path . "jquery.treeview.css"), 'javascript' => array(self::$js_path . "jquery.treeview.js")), 'treeview_async' => array('deps' => array('treeview'), 'javascript' => array(self::$js_path . "jquery.treeview.async.js", self::$js_path . "jquery.treeview.edit.js")), 'googlemaps' => array('javascript' => array("http://maps.google.com/maps/api/js?v=3.5&sensor=false")), 'multimap' => array('javascript' => array("http://developer.multimap.com/API/maps/1.2/" . parent::$multimap_api_key)), 'virtualearth' => array('javascript' => array('http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1')), 'google_search' => array('stylesheets' => array(), 'javascript' => array("http://www.google.com/jsapi?key=" . parent::$google_search_api_key, self::$js_path . "google_search.js")), 'fancybox' => array('deps' => array('jquery'), 'stylesheets' => array(self::$js_path . 'fancybox/jquery.fancybox.css'), 'javascript' => array(self::$js_path . 'fancybox/jquery.fancybox.pack.js')), 'flickr' => array('deps' => array('fancybox'), 'javascript' => array(self::$js_path . "jquery.flickr.js")), 'treeBrowser' => array('deps' => array('jquery', 'jquery_ui'), 'javascript' => array(self::$js_path . "jquery.treebrowser.js")), 'defaultStylesheet' => array('deps' => array(''), 'stylesheets' => array(self::$css_path . "default_site.css"), 'javascript' => array()), 'validation' => array('deps' => array('jquery'), 'javascript' => array(self::$js_path . 'jquery.validate.js')), 'plupload' => array('deps' => array('jquery_ui', 'fancybox'), 'javascript' => array(self::$js_path . 'jquery.uploader.js', self::$js_path . '/plupload/js/plupload.full.min.js')), 'jqplot' => array('stylesheets' => array(self::$js_path . 'jqplot/jquery.jqplot.css'), 'javascript' => array(self::$js_path . 'jqplot/jquery.jqplot.min.js', '[IE]' . self::$js_path . 'jqplot/excanvas.min.js')), 'jqplot_bar' => array('javascript' => array(self::$js_path . 'jqplot/plugins/jqplot.barRenderer.min.js')), 'jqplot_pie' => array('javascript' => array(self::$js_path . 'jqplot/plugins/jqplot.pieRenderer.min.js')), 'jqplot_category_axis_renderer' => array('javascript' => array(self::$js_path . 'jqplot/plugins/jqplot.categoryAxisRenderer.min.js')), 'jqplot_trendline' => array('javascript' => array(self::$js_path . 'jqplot/plugins/jqplot.trendline.min.js')), 'reportgrid' => array('deps' => array('jquery_ui'), 'javascript' => array(self::$js_path . 'jquery.reportgrid.js', self::$js_path . 'json2.js')), 'tabs' => array('deps' => array('jquery_ui'), 'javascript' => array(self::$js_path . 'tabs.js')), 'wizardprogress' => array('deps' => array('tabs'), 'stylesheets' => array(self::$css_path . "wizard_progress.css")), 'spatialReports' => array('javascript' => array(self::$js_path . 'spatialReports.js')), 'jsonwidget' => array('javascript' => array(self::$js_path . "jsonwidget/json.js", self::$js_path . "jsonwidget/jsonedit.js", self::$js_path . "jquery.jsonwidget.js"), 'stylesheets' => array(self::$css_path . "jsonwidget.css")));
     }
     return self::$resource_list;
 }