Merge branch 'ad_banner' of https://github.com/Rulingcom/orbit into ad_banner
This commit is contained in:
commit
1e43349eb8
24 files changed
+1125
-1011
No files matched your search
@@ -17,4 +17,12 @@ $('.quick_edit_cancel').live('click', function(){
|
||||
$('#' + tr).hide();
|
||||
$("tr#bulletin_file_" + $(this).prev().attr('value')).hide();
|
||||
$("tr#bulletin_link_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
|
||||
$(document).on('click', '.list-remove', function(){
|
||||
$('#delete_bulletins').submit();
|
||||
});
|
||||
|
||||
$(document).on('click', '#check_all_bulletins', function(){
|
||||
$('.checkbox_in_list').attr("checked", this.checked);
|
||||
});
|
||||
@@ -11,4 +11,6 @@
|
||||
//= require jquery.tinyscrollbar.min
|
||||
//= require orbit-1.0
|
||||
//= require tinymce-jquery
|
||||
//= require tinymce_orbit
|
||||
//= require tinymce_orbit
|
||||
//= require orbit-bar-search
|
||||
//= require side_bar_history
|
||||
@@ -0,0 +1,20 @@
|
||||
$(document).on('click', '.orbit-bar-search', function (){
|
||||
if ($(this).parents('.search').hasClass('visible')){
|
||||
$(this).parents('.search').stop().animate({
|
||||
'width':'28px',
|
||||
});
|
||||
$(this).parents('.search').css({
|
||||
'background-color': 'transparent',
|
||||
});
|
||||
$(this).parents('.search').removeClass('visible');
|
||||
}
|
||||
else{
|
||||
$(this).parents('.search').stop().animate({
|
||||
'width':'265px',
|
||||
});
|
||||
$(this).parents('.search').css({
|
||||
'background-color': 'rgba(0, 0, 0, 0.5)',
|
||||
});
|
||||
$(this).parents('.search').addClass('visible');
|
||||
}
|
||||
});
|
||||
@@ -1,31 +1,49 @@
|
||||
$(function () {
|
||||
$('#back_sidebar a, #back_main a.nav').live('click',
|
||||
function () {
|
||||
$.getScript(this.href);
|
||||
history.pushState(null, document.title, this.href);
|
||||
history_edited = true;
|
||||
return false;
|
||||
}
|
||||
);
|
||||
var history_edited = false;
|
||||
|
||||
$('#back_main a.reload').live('click',
|
||||
function () {
|
||||
$.getScript(this.href);
|
||||
history.replaceState(null, document.title, this.href);
|
||||
history_edited = true;
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$('.form').live('submit', function () {
|
||||
$.post(this.action, $(this).serialize(), null, 'script');
|
||||
$('#back_sidebar a, #back_main a.nav').live('click',
|
||||
function () {
|
||||
$.getScript(this.href);
|
||||
history.pushState(null, document.title, this.href);
|
||||
history_edited = true;
|
||||
return false;
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
$(window).bind("popstate", function () {
|
||||
if (history_edited) {
|
||||
$.getScript(location.href);
|
||||
}
|
||||
});
|
||||
$('#back_main a.reload').live('click',
|
||||
function () {
|
||||
$.getScript(this.href);
|
||||
history.replaceState(null, document.title, this.href);
|
||||
history_edited = true;
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$('.form').live('submit', function () {
|
||||
$.post(this.action, $(this).serialize(), null, 'script');
|
||||
history_edited = true;
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).on('click', '.js_history',
|
||||
function () {
|
||||
$.getScript(this.href);
|
||||
history.pushState(null, document.title, this.href);
|
||||
history_edited = true;
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$(document).on('click', '.pagination a',
|
||||
function () {
|
||||
$.getScript(this.href);
|
||||
history.pushState(null, document.title, this.href);
|
||||
history_edited = true;
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$(window).bind("popstate", function () {
|
||||
if (history_edited) {
|
||||
$.getScript(location.href);
|
||||
}
|
||||
});
|
||||
+8
@@ -102,6 +102,14 @@ table .span1-2 {
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
table .span1-3 {
|
||||
min-width: 200px;
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
.qe-block .form-horizontal .form-actions {
|
||||
text-align:right;
|
||||
}
|
||||
.modal.fade {
|
||||
top: -50%;
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -102,18 +102,10 @@ module ApplicationHelper
|
||||
' web-symbol' if params[:sort].eql?(name)
|
||||
end
|
||||
|
||||
def add_filter(param_name, value)
|
||||
filter = params[:filter] rescue nil
|
||||
if filter && filter.has_key(param_name)
|
||||
filter[param_name] << value
|
||||
elsif filter
|
||||
filter.merge({param_name => [value]})
|
||||
else
|
||||
{param_name => [value]}
|
||||
end
|
||||
def is_filter_active?(type, id)
|
||||
' active' if (@filter[type].include?(id.to_s) rescue nil)
|
||||
end
|
||||
|
||||
|
||||
def process_page(page, id)
|
||||
parse_page_noko(page, id)
|
||||
end
|
||||
@@ -152,6 +144,7 @@ module ApplicationHelper
|
||||
javascripts << "<script type='text/javascript' src='/assets/jquery.tinyscrollbar.min.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/assets/jquery.isotope.min.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/assets/orbit-bar-member.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/assets/orbit-bar-search.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/assets/orbit_bar.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/assets/event.js'></script>\n"
|
||||
page.design.javascripts.each do |js|
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
class Design
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include ParserLayout
|
||||
|
||||
field :title
|
||||
field :author
|
||||
@@ -14,7 +15,7 @@ class Design
|
||||
embeds_one :reset_css, :class_name => "Stylesheet", :cascade_callbacks => true
|
||||
embeds_many :themes, :cascade_callbacks => true
|
||||
embeds_many :javascripts, :cascade_callbacks => true
|
||||
embeds_many :images, :cascade_callbacks => true
|
||||
embeds_many :images, :as => :design_image, :cascade_callbacks => true
|
||||
# embeds_many :custom_images, :class_name => 'Image', :cascade_callbacks => true
|
||||
|
||||
validates_presence_of :title
|
||||
@@ -65,9 +66,6 @@ class Design
|
||||
protected
|
||||
|
||||
def parse_css_for_images
|
||||
self.images.each do |image|
|
||||
image.save
|
||||
end
|
||||
if (self.default_css && self.default_css.changed)
|
||||
self.default_css.parse_urls
|
||||
end
|
||||
@@ -76,6 +74,7 @@ class Design
|
||||
theme.parse_urls
|
||||
end
|
||||
end
|
||||
parse_body_for_images(self)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -27,6 +27,7 @@ class Stylesheet < DesignFile
|
||||
temp_file = File.new(dir + '/' + orig_file_name, 'w+')
|
||||
temp_file.write content.force_encoding("UTF-8")
|
||||
self.file = temp_file
|
||||
self.save
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
</div>
|
||||
<ul class="nav">
|
||||
<li><%= link_to t(:homepage), root_path, :class => 'orbit-bar-home' %></li>
|
||||
<li><a class="orbit-bar-desktop" href="#">Desktop</a></li>
|
||||
</ul>
|
||||
<ul class="nav pull-right">
|
||||
<li class="dropdown language">
|
||||
@@ -25,6 +26,13 @@
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="search clear">
|
||||
<a class="orbit-bar-search" href="#">search</a>
|
||||
<form class="navbar-search" action="">
|
||||
<input class="search-query span3" type="text" placeholder="<%= t(:search_nccu) %>">
|
||||
</form>
|
||||
</li>
|
||||
<% if user_signed_in? %>
|
||||
<li class="dropdown active">
|
||||
<a class="orbit-bar-account" href="#" data-toggle="dropdown">
|
||||
@@ -94,9 +102,6 @@
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<form class="navbar-search span6" action="">
|
||||
<input class="search-query span4" type="text" placeholder="<%= t(:search_nccu) %>">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
Reference in new issue
Block a user