1
0
Fork 0
mirror of https://github.com/kbparagua/paloma synced 2023-03-27 23:21:17 -04:00

Fix _callbacks.js, comments

This commit is contained in:
Bia Esmero 2012-12-19 18:55:44 +08:00
parent ea6ea9f621
commit e6cd15ff3d
4 changed files with 18 additions and 4 deletions

View file

@ -71,7 +71,8 @@ module Paloma
#_callbacks.js per folder(controller)
has_callbacks = File.exists? callbacks
unless has_callbacks
copy_file '_callbacks.js', callbacks
content = File.read(templates + '_callbacks.js').gsub('controller', "#{controller}")
File.open(callbacks, 'w'){ |f| f.write(content) }
File.open(INDEX, 'a+'){|f| f << "\n//= require ./" + controller + '/_callbacks' }
end

View file

@ -1 +1,2 @@
//= require ./controller/_local
//= require_tree .

View file

@ -5,10 +5,16 @@ Paloma.controller = {
under the controller folder.
Example:
variableName: value;
functionName = function(params){
functionName: function(params){
alert('Paloma');
};
To use the variable and function:
Paloma.controller.variableName
Paloma.controller.functionName(params);
*/
};

View file

@ -3,14 +3,20 @@ window.Paloma = {callbacks:{}};
Paloma.g = {
/*
Put here global code which can be used by all callbacks,
Put here global code that can be used by all callbacks,
regardless which folder they're from.
Example:
variableName: value;
functionName = function(params){
functionName: function(params){
alert('Paloma');
};
To use the variable and function:
Paloma.g.variableName
Paloma.g.functionName(params);
*/
};