Skip to content

Commit

Permalink
Rough outlines
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Rafter committed Jun 13, 2011
0 parents commit 4c14c8a
Show file tree
Hide file tree
Showing 130 changed files with 4,131 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
*.gem
.bundle
Gemfile.lock
pkg/*
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "http://rubygems.org"

# Gem's dependencies in simple_admin.gemspec
gemspec
21 changes: 21 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
== SimpleAdmin

I need an admin module for Rails and it has to be simple. ActiveAdmin is
beautiful and has a great DSL, but complex under the covers.

Goals:

* Minimal meta-programming
* Beautiful interface (hey, just use the ActiveAdmin interfaces!)
* Themeable
* Nice DSL
* Rails-friendly
* Fewer dependencies
* Fewer options

= What this means to you

If you want to customize a bunch of stuff, you might want to keep looking.

Ultimately, there is always a need for projects like ActiveAdmin. Sometimes
you can get away with something simpler, sometimes you can't.
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require 'bundler'
Bundler::GemHelper.install_tasks
2 changes: 2 additions & 0 deletions TODO.rdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Enable themes
* Add configuration for load_paths and remove app/admin as a hardcoded value (make it default)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions app/assets/javascripts/simple_admin/active_admin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* Active Admin JS */

$(function(){
$(".datepicker").datepicker({dateFormat: 'yy-mm-dd'});

$(".clear_filters_btn").click(function(){
window.location.search = "";
return false;
});

// AJAX Comments
$('form#admin_note_new').submit(function() {

if ($(this).find('#admin_note_body').val() != "") {
$(this).fadeOut('slow', function() {
$('.loading_indicator').fadeIn();
$.ajax({
url: $(this).attr('action'),
type: 'POST',
dataType: 'json',
data: $(this).serialize(),
success: function(data, textStatus, xhr) {
$('.loading_indicator').fadeOut('slow', function(){

// Hide the empty message
$('.admin_notes_list li.empty').fadeOut().remove();

// Add the note
$('.admin_notes_list').append(data['note']);

// Update the number of notes
$('.admin_notes h3 span.admin_notes_count').html("(" + data['number_of_notes'] + ")");

// Reset the form
$('form#new_active_admin_admin_note').find('#active_admin_admin_note_body').val("");

// Show the form
$('form#new_active_admin_admin_note').fadeIn('slow');
})
},
error: function(xhr, textStatus, errorThrown) {
//called when there is an error
}
});
});

};

return false;
});
});
382 changes: 382 additions & 0 deletions app/assets/javascripts/simple_admin/active_admin_vendor.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions app/assets/stylesheets/simple_admin/active_admin.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
*= require './active_admin.scss'
*/

Loading

0 comments on commit 4c14c8a

Please sign in to comment.