metamaps--metamaps/codeguide.txt

72 lines
1.7 KiB
Text
Raw Permalink Normal View History

FILE /app/views/layouts/application.html.erb
<head>
...
<%= javascript_include_tag "application" %>
<% if (controller_name == "maps" || controller_name == "topics") && action_name == "show" %>
<%= javascript_include_tag "compileMapPages" %>
<% end %>
...
</head>
WHAT DOES IT MEAN?
____________________________________________________________________
FILE /app/assets/javascripts/application.js
...
//= require jquery
//= require jquery-ui
//= require jquery_ujs
//= require ./orderedLibraries/underscore
//= require ./orderedLibraries/backbone
//= require_directory ./librariesForAllPages
//= require ./metamaps/Metamaps.GlobalUI
//= require ./metamaps/Metamaps.Backbone
WHAT DOES IT MEAN?
____________________________________________________________________
FILE /app/assets/javascripts/compileMapPages.js
...
//= require ./librariesForMapPages/cloudcarousel
//= require ./librariesForMapPages/socket.io
//= require ./metamaps/JIT
//= require ./metamaps/Metamaps
//= require ./metamaps/Metamaps.JIT
WHAT DOES IT MEAN?
____________________________________________________________________
FILE /app/assets/javascripts/metamaps/Metamaps.GlobalUI.js
var Metamaps = {};
...
$(document).ready(function () {
for (var prop in Metamaps) {
// this runs the init function within each sub-object on the Metamaps one
if (Metamaps.hasOwnProperty(prop) &&
Metamaps[prop].hasOwnProperty('init') &&
typeof (Metamaps[prop].init) == 'function'
) {
Metamaps[prop].init();
}
}
});
Metamaps.GlobalUI = {
...
};
WHAT DOES IT MEAN?
____________________________________________________________________