2009-11-03 03:32:31 +00:00
|
|
|
Event.observe(window, 'load', function() {
|
|
|
|
$$('.media-item').each(function(item) {
|
|
|
|
item.select('.savesend').each(function(savesend) {
|
|
|
|
var button = new Element('input', { type: 'submit', name: 'save', value: 'Save changes' }).addClassName('button');
|
|
|
|
savesend.insert({top: button});
|
2009-11-02 03:32:35 +00:00
|
|
|
});
|
2009-11-03 03:32:31 +00:00
|
|
|
|
2009-11-02 03:32:35 +00:00
|
|
|
var show_insert = function(t) {
|
2009-11-03 03:32:31 +00:00
|
|
|
var b = item.select('input[name*=send]').pop();
|
|
|
|
if (b) { b[(t.value == 'none') ? 'show' : 'hide'](); }
|
|
|
|
}
|
|
|
|
|
2009-11-17 02:53:40 +00:00
|
|
|
var type = item.select('input[name*=comicpress_management][checked]').pop();
|
2009-11-02 03:32:35 +00:00
|
|
|
if (type) {
|
2009-11-17 02:53:40 +00:00
|
|
|
item.select('.filename.new').pop().insert({bottom: new Element('div').addClassName('comicpress-is-managing')});
|
2009-11-02 03:32:35 +00:00
|
|
|
show_insert(type);
|
|
|
|
}
|
|
|
|
});
|
2009-11-03 03:32:31 +00:00
|
|
|
});
|