Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
234a6f0ae6 | ||
|
|
98a03c2e40 | ||
|
|
9d7af2ccac |
No files matched your search
@@ -81,7 +81,7 @@ function customOpenSlide() {
|
||||
} else {
|
||||
$('#pageslide form').prop('method', 'post')
|
||||
};
|
||||
_type == 'page' ? pageSetting(element.data('id'), _edit) : linkSetting(element.data('id'), _edit);
|
||||
_type == 'page' ? pageSetting(element.data('id'), _edit) : linkSetting(element.data('id'), _edit, pageslide);
|
||||
}
|
||||
});
|
||||
$iFrame.pageslide({
|
||||
@@ -237,8 +237,8 @@ function pageSetting(id, edit) {
|
||||
};
|
||||
};
|
||||
|
||||
function linkSetting(id, edit) {
|
||||
$linkPublishedTrue = $('#link_is_published_true');
|
||||
function linkSetting(id, edit, ps) {
|
||||
$linkPublishedTrue = ps.find('#link_is_published_true');
|
||||
_status = edit;
|
||||
if(_status) {
|
||||
$.ajax({
|
||||
@@ -250,6 +250,7 @@ function linkSetting(id, edit) {
|
||||
})
|
||||
.done(function(data) {
|
||||
_linkData = data;
|
||||
console.log($linkPublishedTrue)
|
||||
data.public ? $linkPublishedTrue.prop('checked', true) : $linkPublishedTrue.prop('checked', false);
|
||||
$linkPublishedTrue.prop('checked') ? $('.link-options').slideDown(300) : $('.link-options').slideUp(300);
|
||||
$.each(_linkData.link, function(index, val) {
|
||||
|
||||
@@ -54,10 +54,9 @@ class Admin::DesignsController < OrbitBackendController
|
||||
when 'javascripts', 'themes'#, 'images'
|
||||
@object = @design.send(params[:type]).find(params[:object_id])
|
||||
end
|
||||
|
||||
Dir.mktmpdir('f_path') { |dir|
|
||||
temp_file = File.new(dir + '/' + File.basename(@object.file.url), 'w+')
|
||||
temp_file.write(params[:file][:content].force_encoding('UTF-8'))
|
||||
temp_file.write(params[:html_code].force_encoding('UTF-8'))
|
||||
@object.remove_file!
|
||||
@object.file = temp_file
|
||||
@object.save
|
||||
|
||||
@@ -341,9 +341,18 @@ class ApplicationController < ActionController::Base
|
||||
else
|
||||
objects = get_viewable(object_class, query)
|
||||
end
|
||||
|
||||
if (!user_signed_in? && object_class == "bulletin")
|
||||
objects = get_bulletins_for_open_backend(objects)
|
||||
end
|
||||
|
||||
Kaminari.paginate_array(filter_authorized_objects(objects)).page(params[:page]).per(10)
|
||||
end
|
||||
|
||||
def get_bulletins_for_open_backend(objects)
|
||||
objects.select{|object| object.is_rejected == false && object.is_pending == false}
|
||||
end
|
||||
|
||||
def get_string_value_from_object(object)
|
||||
s = object.name_translations[I18n.locale.to_s] unless s rescue nil
|
||||
s = object.title_translations[I18n.locale.to_s] unless s rescue nil
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
</div>
|
||||
|
||||
<% @design.javascripts.each do |js| %>
|
||||
<div class="clearfix tab-pane fade active in" id="#<%= dom_id js %>">
|
||||
<div class="clearfix tab-pane fade active in" id="<%= dom_id js %>">
|
||||
<%= render :partial => 'tab_form', :locals => {:type => :javascripts, :object => js} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
Reference in new issue
Block a user