Skip to content

Commit

Permalink
Removed ActiveRecord#dom_id extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
clemens committed Sep 24, 2008
1 parent cafb2aa commit c261fa5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
8 changes: 4 additions & 4 deletions public/javascripts/admin/asset_widget.js
Expand Up @@ -74,7 +74,7 @@ var AssetWidget = {
}
},
isAttached: function(element) {
return $('attached-asset-' + this.assetId(element)) ? true : false;
return $('attached_asset_' + this.assetId(element)) ? true : false;
},
updateSelected: function() {
if(!$('assets-widget')) return;
Expand Down Expand Up @@ -104,7 +104,7 @@ var AssetWidget = {
asset.removeClassName('selected');
});
ids.each(function(id) {
var asset = $(prefix + '-asset-' + id);
var asset = $(prefix + '_asset_' + id);
if (asset) { asset.addClassName('selected'); }
});
}.bind(this));
Expand All @@ -114,11 +114,11 @@ var AssetWidget = {
},
showAttachTools: function(id) {
if(this.isEdit()) {
['attach', 'detach'].each(function(prefix){ $(prefix + '-' + id).show(); })
['attach', 'detach'].each(function(prefix){ $(prefix + '_' + id).show(); })
}
},
hideAttachTools: function(id) {
['attach', 'detach'].each(function(prefix){ $(prefix + '-' + id).hide(); })
['attach', 'detach'].each(function(prefix){ $(prefix + '_' + id).hide(); })
},
search: function(query) {
if(!query) return;
Expand Down
@@ -1,7 +1,7 @@
<li id="<%= asset.dom_id("#{prefix}-asset") %>" class="asset <%= prefix %>-asset <%= ' selected' if content and content.assets.include?(asset) %>">
<li id="<%= dom_id(asset, prefix) %>" class="asset <%= prefix %>-asset <%= ' selected' if content and content.assets.include?(asset) %>">
<%= link_to asset_image_for(asset), asset.public_filename %>
<div>
<a href="#"><%= image_tag('/images/icons/add.png', :size => '16x16', :id => asset.dom_id("attach-#{prefix}-asset"), :style => 'display: none', :class => 'attach-asset') %></a>
<a href="#"><%= image_tag('/images/icons/delete.png', :size => '16x16', :id => asset.dom_id("detach-#{prefix}-asset"), :style => 'display: none', :class => 'detach-asset') %></a>
<a href="#"><%= image_tag('/images/icons/add.png', :size => '16x16', :id => dom_id(asset, "attach_#{prefix}"), :style => 'display: none', :class => 'attach-asset') %></a>
<a href="#"><%= image_tag('/images/icons/delete.png', :size => '16x16', :id => dom_id(asset, "detach_#{prefix}"), :style => 'display: none', :class => 'detach-asset') %></a>
</div>
</li>
1 change: 0 additions & 1 deletion vendor/engines/adva_cms/init.rb
Expand Up @@ -7,7 +7,6 @@
require 'core_ext/hash'
require 'core_ext/kernel'
require 'core_ext/string'
require 'rails_ext/active_record/dom_id'
require 'rails_ext/active_record/sti_instantiation'

require 'routing'
Expand Down
11 changes: 0 additions & 11 deletions vendor/engines/adva_cms/lib/rails_ext/active_record/dom_id.rb

This file was deleted.

0 comments on commit c261fa5

Please sign in to comment.