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) {
|
function setForm(data) {
|
||||||
$.each(data, function(key, value) {
|
$.each(data, function(key, value) {
|
||||||
switch($("#pageslide form #" + key).prop("tagName"))
|
|
||||||
{
|
|
||||||
case "INPUT":
|
|
||||||
$("#pageslide form #" + key).val(value);
|
$("#pageslide form #" + key).val(value);
|
||||||
break;
|
|
||||||
case "SELECT":
|
|
||||||
$("#pageslide form #" + key).val(value);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,15 @@ class PagesController < ApplicationController
|
||||||
|
|
||||||
if @item
|
if @item
|
||||||
delayed_impressionist(@item)
|
delayed_impressionist(@item)
|
||||||
|
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
|
render_page
|
||||||
|
end
|
||||||
else
|
else
|
||||||
redirect_to '/admin/dashboards',:notice=>t(:need_home)
|
redirect_to '/admin/dashboards',:notice=>t(:need_home)
|
||||||
# render :text => t(:need_home)
|
# render :text => t(:need_home)
|
||||||
|
|
|
@ -29,13 +29,11 @@
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if @edit %>
|
<% if @edit %>
|
||||||
<script>
|
<script>
|
||||||
$(window).load(function() {
|
$(document).ajaxStop(function() {
|
||||||
setTimeout(function(){
|
|
||||||
$('a').not('.nav').on('click', function(e){
|
$('a').not('.nav').on('click', function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
$('a').not('.nav').css("cursor", "default");
|
$('a').not('.nav').css("cursor", "default");
|
||||||
}, 200);
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -25,6 +25,7 @@ namespace :new_ui do
|
||||||
migrate_managers
|
migrate_managers
|
||||||
migrate_ad_images_dates
|
migrate_ad_images_dates
|
||||||
migrate_ad_banners
|
migrate_ad_banners
|
||||||
|
save_pages
|
||||||
end
|
end
|
||||||
|
|
||||||
# :category_name is optional, depends on the naming of the category model: if no conventional, specify it
|
# :category_name is optional, depends on the naming of the category model: if no conventional, specify it
|
||||||
|
|
Reference in New Issue