Remove js from html
This commit is contained in:
1 parent
962bf03af2
commit
26b49dcf02
25 files changed
+101
-1206
No files matched your search
@@ -1,25 +1,5 @@
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render 'admin/items/site_map_left_bar' %>
|
||||
<% end -%>
|
||||
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<!-- <script type="text/javascript" charset="utf-8">
|
||||
$('a.sidebar_link').live( "click", function(){
|
||||
$(this).removeClass('sidebar_link');
|
||||
$('.sidebar_no_link').addClass('sidebar_link');
|
||||
$('.sidebar_no_link').removeClass('sidebar_no_link');
|
||||
$(this).addClass('sidebar_no_link');
|
||||
});
|
||||
</script> -->
|
||||
<% end -%>
|
||||
|
||||
<% content_for :page_specific_css do %>
|
||||
<!-- <style type="text/css">
|
||||
.sidebar_no_link {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
}
|
||||
</style> -->
|
||||
<% end %>
|
||||
<%= render "admin/#{@item._type.downcase.pluralize}/show" %>
|
||||
@@ -3,10 +3,5 @@
|
||||
<%= parse_page_edit(@item).html_safe %>
|
||||
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$("div.editable").live("mouseenter mouseleave",
|
||||
function (event) {
|
||||
$(this).children('.edit_link').toggle();
|
||||
});
|
||||
</script>
|
||||
<%= javascript_include_tag "page_edit" %>
|
||||
<% end -%>
|
||||
@@ -62,18 +62,6 @@
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$('div a.hide').live( "click", function(){
|
||||
$(this).parent().next().hide();
|
||||
$(this).replaceWith("<a href='#' class='show'><%= t(:show) %></a>");
|
||||
});
|
||||
$('div a.show').live( "click", function(){
|
||||
$(this).parent().next().show();
|
||||
$(this).replaceWith("<a href='#' class='hide'><%= t(:hide) %></a>");
|
||||
});
|
||||
</script>
|
||||
<%= javascript_include_tag "translation_page" %>
|
||||
<% end -%>
|
||||
@@ -53,41 +53,5 @@
|
||||
</div>
|
||||
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$('#attributes_block a.delete').live('click', function(){
|
||||
$(this).parent().parent().parent().remove();
|
||||
});
|
||||
|
||||
$('#attributes_block a.add').click(function(){
|
||||
$('#attributes').append("<%= escape_javascript(render(:partial => 'admin/user_attribute_models/attribute_model', :object => @user_attribute_model.attribute_models.build)) %>");
|
||||
});
|
||||
|
||||
$('#attributes_block a.remove_existing_record').click(function(){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$(this).parent().parent().hide();
|
||||
});
|
||||
|
||||
$('#attributes_block a.change_built_in').click(function(){
|
||||
$(this).parent().toggleClass('disable');
|
||||
var $am = $(this).next('.built_in_state')
|
||||
$am.attr('value', ($am.attr('value') == "false") ? "true" : "false");
|
||||
});
|
||||
|
||||
$('.select_mulitlingual input').live('click', function(){
|
||||
$(this).next().attr('value', this.checked);
|
||||
});
|
||||
|
||||
$('.select_type select').live('change', function(){
|
||||
if(this.value == 'select')
|
||||
{
|
||||
$(this).next().show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).next().hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
<%= javascript_include_tag "user_attribute_model_form" %>
|
||||
<% end -%>
|
||||
@@ -1,43 +1,32 @@
|
||||
<p>
|
||||
<%= f.label :name %>
|
||||
<%= f.text_field :name %>
|
||||
<%= f.label :name %>
|
||||
<%= f.text_field :name %>
|
||||
</p>
|
||||
|
||||
<fieldset>
|
||||
<% @user_attribute.attrs.each_with_index do |attr, i| %>
|
||||
<p>
|
||||
<label><%= attr["key"] %></label>
|
||||
<%= hidden_field_tag "user_attribute[attrs][][key]", attr["key"] %>
|
||||
<%= text_field_tag "user_attribute[attrs][][name]", attr["name"] %>
|
||||
<%= select_tag "user_attribute[attrs][][type]", options_for_select(["text_field", "select"], attr["type"]) %>
|
||||
<a href="#" class="remove">(remove)</a>
|
||||
</p>
|
||||
<% end -%>
|
||||
|
||||
<p id="newone">
|
||||
<label>Key</label>
|
||||
<%= text_field_tag "user_attribute[attrs][][key]", "" %>
|
||||
<label>Name</label>
|
||||
<%= text_field_tag "user_attribute[attrs][][name]", "" %>
|
||||
<%= select_tag "user_attribute[attrs][][type]", options_for_select(["text_field"], "") %>
|
||||
<a href="#" class="remove">(remove)</a>
|
||||
</p>
|
||||
|
||||
<a href="#" class="add">(add)</a>
|
||||
|
||||
<% @user_attribute.attrs.each_with_index do |attr, i| %>
|
||||
<p>
|
||||
<label><%= attr["key"] %></label>
|
||||
<%= hidden_field_tag "user_attribute[attrs][][key]", attr["key"] %>
|
||||
<%= text_field_tag "user_attribute[attrs][][name]", attr["name"] %>
|
||||
<%= select_tag "user_attribute[attrs][][type]", options_for_select(["text_field", "select"], attr["type"]) %>
|
||||
<a href="#" class="remove">(remove)</a>
|
||||
</p>
|
||||
<% end -%>
|
||||
|
||||
<p id="newone">
|
||||
<label>Key</label>
|
||||
<%= text_field_tag "user_attribute[attrs][][key]", "" %>
|
||||
<label>Name</label>
|
||||
<%= text_field_tag "user_attribute[attrs][][name]", "" %>
|
||||
<%= select_tag "user_attribute[attrs][][type]", options_for_select(["text_field"], "") %>
|
||||
<a href="#" class="remove">(remove)</a>
|
||||
</p>
|
||||
|
||||
<a href="#" class="add">(add)</a>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var newone = $('fieldset #newone').clone();
|
||||
$('fieldset #newone').remove();
|
||||
|
||||
$('fieldset a.remove').live( "click", function(){
|
||||
$(this).parent().remove();
|
||||
});
|
||||
|
||||
$('fieldset a.add').click(function(){
|
||||
newone.clone().appendTo( $('fieldset') );
|
||||
})
|
||||
</script>
|
||||
<%= javascript_include_tag "user_attribute_form" %>
|
||||
<% end -%>
|
||||
@@ -36,12 +36,5 @@
|
||||
</div>
|
||||
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function(){
|
||||
$('#user_active_role').change(function(){
|
||||
$('#role_models .roles_block').hide();
|
||||
$('#'+this.value+'_block').toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<%= javascript_include_tag "user_form" %>
|
||||
<% end -%>
|
||||
Reference in new issue
Block a user