Fix homepage in structure, ajaxStop for structure edit, setForm in pageslide.js
This commit is contained in:
parent
52fa11a429
commit
94c1d7d5a0
|
@ -327,15 +327,7 @@
|
|||
|
||||
function setForm(data) {
|
||||
$.each(data, function(key, value) {
|
||||
switch($("#pageslide form #" + key).prop("tagName"))
|
||||
{
|
||||
case "INPUT":
|
||||
$("#pageslide form #" + key).val(value);
|
||||
break;
|
||||
case "SELECT":
|
||||
$("#pageslide form #" + key).val(value);
|
||||
break;
|
||||
}
|
||||
$("#pageslide form #" + key).val(value);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,15 @@ class PagesController < ApplicationController
|
|||
|
||||
if @item
|
||||
delayed_impressionist(@item)
|
||||
render_page
|
||||
if params[:edit]
|
||||
if request.referer && request.referer.ends_with?("admin/items")
|
||||
redirect_to admin_page_url(@item)
|
||||
else
|
||||
render :file => "#{Rails.root}/public/403.html", :status => 403
|
||||
end
|
||||
else
|
||||
render_page
|
||||
end
|
||||
else
|
||||
redirect_to '/admin/dashboards',:notice=>t(:need_home)
|
||||
# render :text => t(:need_home)
|
||||
|
|
|
@ -29,13 +29,11 @@
|
|||
<% end -%>
|
||||
<% if @edit %>
|
||||
<script>
|
||||
$(window).load(function() {
|
||||
setTimeout(function(){
|
||||
$('a').not('.nav').on('click', function(e){
|
||||
e.preventDefault();
|
||||
});
|
||||
$('a').not('.nav').css("cursor", "default");
|
||||
}, 200);
|
||||
$(document).ajaxStop(function() {
|
||||
$('a').not('.nav').on('click', function(e){
|
||||
e.preventDefault();
|
||||
});
|
||||
$('a').not('.nav').css("cursor", "default");
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
|
|
|
@ -25,6 +25,7 @@ namespace :new_ui do
|
|||
migrate_managers
|
||||
migrate_ad_images_dates
|
||||
migrate_ad_banners
|
||||
save_pages
|
||||
end
|
||||
|
||||
# :category_name is optional, depends on the naming of the category model: if no conventional, specify it
|
||||
|
|
Reference in New Issue