Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Custom CSS for backend. #14

Merged
merged 1 commit into from

2 participants

@abdulrauf
Collaborator

Just like custom js I have introduced custom css for backend. If its setting is set to true in application.rb file then custom.css file will loaded in admin template. You also need to create custom.js file in your host app.

@yuritomanek yuritomanek merged commit eddfaf3 into Gluttonberg:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 10, 2013
  1. Custom css for backend.

    Abdul Rauf authored
This page is out of date. Refresh to see the latest.
View
2  app/assets/javascripts/gb_application.js
@@ -425,7 +425,6 @@ var AssetBrowser = {
});
var url = $("#assetsDialog form#asset_search_form").attr("action");
url += ".json?" + $("#assetsDialog form#asset_search_form").serialize()
- // $.getJSON(url, null, AssetBrowser.handleJSON);
$.getJSON(url, null, function(json){
$("#search_tab_results").html(json.markup);
$("#search_tab_results").find("a").click(AssetBrowser.click);
@@ -486,7 +485,6 @@ var AssetBrowser = {
AssetBrowser.close();
}
});
- //auto_save_asset_for_gallery(AssetBrowser.actualLink.attr("data_url") , id )
}
}
View
5 app/helpers/gluttonberg/admin.rb
@@ -73,7 +73,6 @@ def get_localized_value(name)
# controller/action. If there is it renders a link to the help
# controller.
def contextual_help
-
if Help.help_available?(:controller => params[:controller], :page => params[:action])
content_tag(
:p,
@@ -399,8 +398,6 @@ def publisable_dropdown
object.published_at = Time.zone.now if object.published_at.blank?
html = "<fieldset id='publish_meta'><div class='publishing_block' > "
html += select( :state, options_for_select(@@workflow_states , val), {} , :class => "publishing_state" )
- # html += content_tag(:p , self.datetime_select("published_at" , {:prompt => {:day => 'Day', :month => 'Month', :year => 'Year'} , :order => [:day , :month , :year] }, :class => "span2") , :class => "published_at" )
- #
html += datetime_field("published_at")
html += "</div></fieldset>"
@@ -433,10 +430,8 @@ def datetime_field(field_name,date_field_html_opts = {},time_field_html_opts = {
time = self.object.send(field_name).strftime("%I:%M %p")
end
html += text_field_tag("#{unique_field_name}_date" , date , date_field_html_opts )
- # html += "<span class='date'>DD/MM/YYYY</span>"
html += " "
html += text_field_tag("#{unique_field_name}_time" , time , time_field_html_opts )
- # html += "<span class='date time'>HH:MM AM/PM</span>"
html += self.hidden_field("#{field_name}" , :class => "#{unique_field_name}")
html += "<span class='help-block'><span class='span2'>DD/MM/YYYY</span> <span class='span2'>HH:MM AM/PM</span></span>"
html += "<label class='error #{unique_field_name}_error'></label>"
View
4 app/views/layouts/gluttonberg.html.haml
@@ -14,12 +14,12 @@
%link{:href => "/assets/gb_360player.css", :rel => "stylesheet"}
%link{:href => "/assets/gb_admin-override.css", :rel => "stylesheet"}
-
= javascript_include_tag "jquery-1-7-1", "gb_bootstrap", "gb_bootstrap-datepicker", "jquery-dimensions-min" , "jquery-ui-1-8-23-custom-min" , "jquery-validate" , "gb_jquery-dragTree" , "rails" , "gb_tags" , "gb_jeditable" , "gb_ajaxfileupload" , "gb_expander" , "/assets/jcrop/js/jquery-Jcrop-min", "gb_berniecode-animator" , "gb_soundmanager2-jsmin", "gb_360player"
= wysiwyg_js_css_link_tag
= javascript_include_tag "gb_application" , :charset => "utf-8"
= custom_javascript_include_tag
+ = custom_stylesheet_link_tag
:css
body {
@@ -82,4 +82,4 @@
&copy;
%a{:href => "http://freerangefuture.com", :target => "_blank"}
Freerange Future
- 2012
+ #{Time.now.year}
View
4 lib/generators/gluttonberg/installer/installer_generator.rb
@@ -57,8 +57,8 @@ def localization_config
application %{
# Gluttonberg Related config
-
# config.cms_based_public_css = false
+ # config.custom_css_for_cms = false
# config.custom_js_for_cms = false
config.localize = false
# By Default gluttonberg applications are localized. If you do not want localized application then uncomment following line.
@@ -74,7 +74,7 @@ def localization_config
config.thumbnails = {
:jwysiwyg_image => {:label => "Thumb for jwysiwyg", :filename => "_jwysiwyg_image", :geometry => "250x200"}
}
-
+ config.filter_parameters += [:password_confirmation]
}
View
2  lib/gluttonberg/tasks/asset.rake
@@ -9,7 +9,7 @@ namespace :gluttonberg do
task :create_thumbnails => :environment do
category = Gluttonberg::AssetCategory.find( :first , :conditions =>{ :name => "image" } )
if category
- assets = category.assets #Asset.all
+ assets = category.assets
assets.each do |asset|
p "Generating thumbnails for #{asset.file_name}"
if !File.exist?(asset.tmp_location_on_disk) && !File.exist?(asset.tmp_original_file_on_disk)
Something went wrong with that request. Please try again.