explicit Time.node

This commit is contained in:
James Campos 2011-06-16 11:40:14 -07:00
parent fcff8bc70a
commit 34c37c719a
2 changed files with 30 additions and 29 deletions

View File

@ -1705,7 +1705,9 @@
Time = { Time = {
init: function() { init: function() {
Time.foo(); Time.foo();
return g.callbacks.push(function(root) { return g.callbacks.push(Time.node);
},
node: function(root) {
var day, hour, min, month, s, time, year, _, _ref; var day, hour, min, month, s, time, year, _, _ref;
if (root.className === 'inline') { if (root.className === 'inline') {
return; return;
@ -1720,7 +1722,6 @@
textContent: ' ' + Time.funk(Time) + ' ' textContent: ' ' + Time.funk(Time) + ' '
}); });
return $.replace(s, time); return $.replace(s, time);
});
}, },
foo: function() { foo: function() {
var code; var code;

View File

@ -1364,7 +1364,8 @@ sauce =
Time = Time =
init: -> init: ->
Time.foo() Time.foo()
g.callbacks.push (root) -> g.callbacks.push Time.node
node: (root) ->
return if root.className is 'inline' return if root.className is 'inline'
s = $('span[id^=no]', root).previousSibling s = $('span[id^=no]', root).previousSibling
[_, month, day, year, hour, min] = [_, month, day, year, hour, min] =
@ -1378,7 +1379,6 @@ Time =
time = $.el 'time', time = $.el 'time',
textContent: ' ' + Time.funk(Time) + ' ' textContent: ' ' + Time.funk(Time) + ' '
$.replace s, time $.replace s, time
foo: -> foo: ->
code = $.config('time').replace /%([A-Za-z])/g, (s, c) -> code = $.config('time').replace /%([A-Za-z])/g, (s, c) ->
switch c switch c