Small reordering.

This commit is contained in:
Nicolas Stepien 2012-06-16 17:57:17 +02:00
parent 6b88b14c7d
commit 54dbf09d86
2 changed files with 71 additions and 71 deletions

View File

@ -2428,11 +2428,20 @@
filter: function() { filter: function() {
var el, name, ta; var el, name, ta;
el = this.nextSibling; el = this.nextSibling;
if ((name = this.value) !== 'guide') {
ta = $.el('textarea', {
name: name,
className: 'field',
value: $.get(name, Conf[name])
});
$.on(ta, 'change', $.cb.value);
$.replace(el, ta);
return;
}
if (el) { if (el) {
$.rm(el); $.rm(el);
} }
if ((name = this.value) === 'guide') { return $.after(this, $.el('article', {
$.after(this, $.el('article', {
innerHTML: '<p>Use <a href=https://developer.mozilla.org/en/JavaScript/Guide/Regular_Expressions>regular expressions</a>, one per line.<br>\ innerHTML: '<p>Use <a href=https://developer.mozilla.org/en/JavaScript/Guide/Regular_Expressions>regular expressions</a>, one per line.<br>\
Lines starting with a <code>#</code> will be ignored.<br>\ Lines starting with a <code>#</code> will be ignored.<br>\
For example, <code>/weeaboo/i</code> will filter posts containing the string `<code>weeaboo</code>`, case-insensitive.</p>\ For example, <code>/weeaboo/i</code> will filter posts containing the string `<code>weeaboo</code>`, case-insensitive.</p>\
@ -2459,15 +2468,6 @@
</li>\ </li>\
</ul>' </ul>'
})); }));
return;
}
ta = $.el('textarea', {
name: name,
className: 'field',
value: $.get(name, Conf[name])
});
$.on(ta, 'change', $.cb.value);
return $.after(this, ta);
}, },
time: function() { time: function() {
Time.foo(); Time.foo();

View File

@ -1883,9 +1883,17 @@ Options =
$.cb.value.call @ $.cb.value.call @
filter: -> filter: ->
el = @nextSibling el = @nextSibling
$.rm el if el
if (name = @value) is 'guide' if (name = @value) isnt 'guide'
ta = $.el 'textarea',
name: name
className: 'field'
value: $.get name, Conf[name]
$.on ta, 'change', $.cb.value
$.replace el, ta
return
$.rm el if el
$.after @, $.el 'article', $.after @, $.el 'article',
innerHTML: '<p>Use <a href=https://developer.mozilla.org/en/JavaScript/Guide/Regular_Expressions>regular expressions</a>, one per line.<br> innerHTML: '<p>Use <a href=https://developer.mozilla.org/en/JavaScript/Guide/Regular_Expressions>regular expressions</a>, one per line.<br>
Lines starting with a <code>#</code> will be ignored.<br> Lines starting with a <code>#</code> will be ignored.<br>
@ -1912,14 +1920,6 @@ Options =
For example: <code>top:yes;</code> or <code>top:no;</code>. For example: <code>top:yes;</code> or <code>top:no;</code>.
</li> </li>
</ul>' </ul>'
return
ta = $.el 'textarea',
name: name
className: 'field'
value: $.get name, Conf[name]
$.on ta, 'change', $.cb.value
$.after @, ta
time: -> time: ->
Time.foo() Time.foo()
Time.date = new Date() Time.date = new Date()