mod for ad_banner

This commit is contained in:
Harry Bomrah 2014-11-13 16:29:38 +08:00
parent d836ded7f3
commit f13312ddb6
2 changed files with 9 additions and 1 deletions
app
assets/javascripts
controllers

View File

@ -0,0 +1,8 @@
(function($) {
$("document").ready(function(){
// Get link data-attribute and make the banner clickable
$('.w-ad-banner__slide').not('[data-link=""]').addClass('cursor').on("click",function(){
window.open($(this).data("link"),"_blank");
})
})
}(jQuery));

View File

@ -447,7 +447,7 @@ class PagesController < ApplicationController
end
def set_edit_mode
@dataApi = nil
@dataApi = "frontend"
@editmode = false
if !current_user.nil? and current_user.is_admin?
if params[:editmode] == "on"